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

* {
  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:disabled {
  cursor: wait;
  opacity: 0.72;
}

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

.eyebrow {
  color: var(--gold);
  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;
}

.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;
}

.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-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;
}

.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);
  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 a {
  color: var(--forest);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.hidden {
  display: none;
}

.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;
  }
}

/* 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: auto 104px 104px;
  gap: 10px;
  align-items: stretch;
  --admin-control-height: 46px;
}

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

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

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

.page-tab:not(.is-active):hover {
  background: #eef4f1;
}

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

.admin-actions button {
  align-self: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #1f493d;
  font-size: 13px;
  font-weight: 760;
  line-height: 1;
}

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

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

.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;
}

.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 {
  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));
  }

}

@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));
  }

  .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 {
    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;
}
