:root {
  --sidebar-bg: #1e3a8a;
  --sidebar-bg-deep: #1a2f75;
  --sidebar-hover: rgba(255, 255, 255, 0.12);
  --sidebar-active: rgba(255, 255, 255, 0.18);
  --sidebar-text: #ffffff;
  --sidebar-muted: rgba(255, 255, 255, 0.55);
  --sidebar-width: 260px;

  --brand: #1e3a8a;
  --brand-light: #3b5bdb;
  --accent: #0ea5e9;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #6366f1;

  --bg: #f0f4f8;
  --bg-elevated: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
  --radius: 10px;
  --font: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --bg-elevated: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--brand-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ========== App Shell ========== */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-deep) 100%);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.25s ease;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.25); border-radius: 4px; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logo {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
}
.sidebar-logo-img {
  object-fit: cover;
  padding: 0;
  background: #fff;
}

.logo-upload-block {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 16px;
  border: 1px dashed var(--border, #d1d5db);
  border-radius: 12px;
  background: var(--bg, #f9fafb);
}
.logo-preview {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
}
.logo-preview--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--brand, #1e3a8a);
  background: #e0e7ff;
}
.logo-upload-fields { flex: 1; min-width: 200px; }
.logo-upload-fields > label:first-child { font-weight: 600; display: block; margin-bottom: 4px; }

.cover-preview-wrap { max-width: 560px; }
.cover-preview {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
  display: block;
  background: var(--bg);
}
.cover-preview--empty {
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
}

.stay-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 0.95rem;
  color: #1e3a8a;
}
.stay-summary-hint {
  color: #64748b;
  font-size: 0.85rem;
  width: 100%;
}
.price-breakdown {
  font-size: 0.9rem;
  color: #475569;
  margin-top: 4px;
}

.amenity-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.amenity-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  font-size: 0.9rem;
  cursor: pointer;
}
.amenity-check:hover { border-color: #93c5fd; }
.amenity-check input { width: 16px; height: 16px; }

.gallery-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.gallery-slot-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--bg-elevated);
}
.gallery-slot-label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.gallery-slot-label em {
  font-style: normal;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.75rem;
}
.gallery-slot-num {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #1e3a8a;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}
.gallery-slot-preview {
  height: 130px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.gallery-slot-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-remove {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hotel-hero-cover {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  height: min(360px, 50vw);
}
.hotel-hero-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hotel-public-banner {
  background: linear-gradient(135deg, #1e3a8a, #0ea5e9);
  border-radius: 16px;
  padding: 36px 28px;
  color: #fff;
  margin-bottom: 22px;
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.hotel-public-banner h1 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: 2rem;
}
.hotel-public-banner p { margin: 0; opacity: 0.92; }
.hotel-public-logo {
  width: 88px;
  height: 88px;
  border-radius: 16px;
  object-fit: cover;
  background: #fff;
  padding: 4px;
}
.hotel-public-desc {
  color: #475569;
  line-height: 1.65;
  margin: 0 0 20px;
}
.hotel-section-title {
  font-family: var(--font-display);
  margin: 32px 0 14px;
  font-size: 1.35rem;
  color: #0f172a;
}
.amenity-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.amenity-badge {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}
.hotel-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.hotel-gallery-item {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e8eef5;
  background: #fff;
}
.hotel-gallery-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.hotel-gallery-item figcaption {
  padding: 8px 10px;
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 600;
}
.hotel-gallery-item img.js-lightbox-img:hover,
.hotel-hero-cover img.js-lightbox-img:hover {
  opacity: 0.92;
}

.listing-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
  margin: 8px 0 18px;
  cursor: pointer;
}
.listing-toggle input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}
.listing-toggle strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.listing-toggle small {
  display: block;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.4;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 56px;
}
.lightbox[hidden] { display: none !important; }
.lightbox img {
  max-width: min(960px, 100%);
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(255,255,255,0.12);
  border: 0;
  color: #fff;
  cursor: pointer;
  border-radius: 999px;
  font-size: 1.5rem;
  line-height: 1;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(255,255,255,0.22); }
.lightbox-close { top: 16px; right: 16px; font-size: 1.75rem; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #e2e8f0;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  max-width: 90%;
}
@media (max-width: 640px) {
  .lightbox { padding: 56px 12px 72px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand, #1e3a8a);
  color: #fff;
  border: none;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px 5px 8px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}
.verified-badge__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #fff;
}
.verified-badge__text { color: #fff; }
.verified-badge--sm {
  font-size: 0.7rem;
  padding: 3px 9px 3px 6px;
  gap: 4px;
}
.verified-badge--sm .verified-badge__icon {
  width: 13px;
  height: 13px;
}

.review-summary {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 24px;
  margin: 8px 0 20px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
.review-summary-score {
  display: flex;
  align-items: center;
  gap: 12px;
}
.review-bars { display: flex; flex-direction: column; gap: 10px; }
.review-bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr 36px;
  gap: 10px;
  align-items: center;
}
.review-bar-label { font-size: 0.85rem; color: #334155; }
.review-bar-track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.review-bar-fill {
  height: 100%;
  background: #003580;
  border-radius: 999px;
}
.review-bar-score { font-size: 0.85rem; font-weight: 700; text-align: right; }
.review-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.review-cat-chips span {
  font-size: 0.75rem;
  background: #f1f5f9;
  color: #475569;
  padding: 3px 8px;
  border-radius: 6px;
}
.review-rate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
@media (max-width: 720px) {
  .review-summary { grid-template-columns: 1fr; }
  .review-bar-row { grid-template-columns: 1fr 36px; }
  .review-bar-label { grid-column: 1 / -1; }
}

.sidebar-brand-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.sidebar-brand-text span {
  display: block;
  font-size: 0.65rem;
  color: var(--sidebar-muted);
  margin-top: 2px;
  line-height: 1.3;
}

.sidebar-nav { padding: 12px 10px 24px; flex: 1; }
.nav-section { margin-bottom: 8px; }
.nav-section-title {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
  padding: 12px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,0.9);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.nav-item:hover { background: var(--sidebar-hover); text-decoration: none; color: #fff; }
.nav-item.active { background: var(--sidebar-active); color: #fff; font-weight: 500; }
.nav-item svg { width: 18px; height: 18px; opacity: 0.9; flex-shrink: 0; }
.nav-item .chevron { margin-left: auto; width: 14px; height: 14px; opacity: 0.5; transition: transform 0.2s; }
.nav-item.open .chevron { transform: rotate(180deg); }
.nav-item--feature .nav-item-label { flex: 1; min-width: 0; }
.nav-new-badge {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55);
  animation: navNewBounce 1.4s ease-in-out infinite, navNewPulse 1.8s ease-out infinite;
}
.nav-new-badge--inline {
  margin: 2px 0 0;
  align-self: flex-start;
  animation: navNewBounce 1.4s ease-in-out infinite;
}
.nav-new-badge.is-hidden,
.nav-item--feature.is-seen .nav-new-badge { display: none; }
@keyframes navNewBounce {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-3px); }
  60% { transform: translateY(-1px); }
}
@keyframes navNewPulse {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-new-badge { animation: none; }
}
.nav-group { margin-bottom: 2px; }
.nav-sub {
  display: none;
  padding: 2px 0 6px 40px;
}
.nav-sub.open { display: block; }
.nav-sub a {
  display: block;
  padding: 6px 12px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  border-radius: 6px;
}
.nav-sub a:hover, .nav-sub a.active {
  color: #fff;
  background: var(--sidebar-hover);
  text-decoration: none;
}

.main-wrap {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.menu-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 6px; color: var(--text);
}
.page-title { font-size: 1.1rem; font-weight: 600; margin: 0; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.85rem;
}
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-size: 0.75rem; font-weight: 600;
}

.content { padding: 24px; flex: 1; }

/* ========== Cards & Stats ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.stat-card .label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 4px; }
.stat-card .value { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
.stat-card .meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

.card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-header h2, .card-header h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.card-body { padding: 18px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* ========== Tables ========== */
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
table.data th, table.data td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table.data th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg);
}
table.data tr:hover td { background: rgba(30, 58, 138, 0.03); }

/* ========== Badges & Buttons ========== */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: capitalize;
}
.badge-success, .badge-active, .badge-confirmed, .badge-checked_in, .badge-available, .badge-completed, .badge-paid, .badge-trial { background: #d1fae5; color: #065f46; }
.badge-expired, .badge-cancelled, .badge-suspended { background: #fee2e2; color: #991b1b; }

.notif-wrap { position: relative; }
.notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 1.1rem;
}
.notif-bell:hover { background: var(--bg-hover, rgba(0,0,0,0.06)); }
.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.notif-item--unread { background: rgba(37, 99, 235, 0.06); }
.notif-item p { margin: 6px 0 0; font-size: 0.875rem; color: var(--text-muted); }
.notif-time { font-size: 0.75rem; color: var(--text-muted); margin-left: 8px; }
.badge-warning, .badge-pending, .badge-cleaning, .badge-reserved { background: #fef3c7; color: #92400e; }
.badge-danger, .badge-cancelled, .badge-suspended, .badge-out_of_service, .badge-failed { background: #fee2e2; color: #991b1b; }
.badge-info, .badge-checked_out, .badge-occupied { background: #dbeafe; color: #1e40af; }
.badge-maintenance { background: #ede9fe; color: #5b21b6; }
[data-theme="dark"] .badge-success { background: #064e3b; color: #6ee7b7; }
[data-theme="dark"] .badge-warning { background: #78350f; color: #fcd34d; }
[data-theme="dark"] .badge-danger { background: #7f1d1d; color: #fca5a5; }
[data-theme="dark"] .badge-info { background: #1e3a5f; color: #93c5fd; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-light); color: #fff; }
.btn-secondary { background: var(--bg); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 0.8rem; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }

/* ========== Forms ========== */
.guest-lookup { position: relative; margin-bottom: 14px; }
.guest-lookup > label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 4px;
}
.guest-lookup__results {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% - 4px);
  max-height: 260px;
  overflow: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.guest-lookup__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.guest-lookup__item:hover { background: var(--bg); }
.guest-lookup__item span { font-size: 0.8rem; color: var(--text-muted); }
.guest-lookup__empty {
  padding: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.guest-lookup__hint {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--text-muted);
}
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--bg-elevated);
  color: var(--text);
  transition: border-color 0.15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(59, 91, 219, 0.15);
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

/* ========== Alerts ========== */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.alert-success { background: #d1fae5; color: #065f46; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
[data-theme="dark"] .alert-success { background: #064e3b; color: #6ee7b7; }
[data-theme="dark"] .alert-error { background: #7f1d1d; color: #fca5a5; }

/* ========== What's new (product updates) ========== */
.whats-new {
  margin-bottom: 20px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(30, 58, 138, 0.06), rgba(14, 165, 233, 0.05)),
    var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: whatsNewIn 0.45s ease-out;
}
.whats-new[hidden] { display: none !important; }
.whats-new__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.whats-new__eyebrow {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-light);
}
.whats-new__title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}
.whats-new__lead {
  margin: 0;
  max-width: 52ch;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.whats-new__dismiss {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.whats-new__dismiss:hover {
  color: var(--text);
  border-color: var(--text-muted);
}
.whats-new__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.whats-new__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.whats-new__body strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.95rem;
  color: var(--text);
}
.whats-new__body p {
  margin: 0 0 12px;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}
@keyframes whatsNewIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .whats-new { animation: none; }
}

/* ========== Auth ========== */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(30, 58, 138, 0.15), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(14, 165, 233, 0.12), transparent 50%),
    var(--bg);
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-elevated);
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 36px 32px;
}
.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}
.auth-brand .logo {
  width: 56px; height: 56px;
  margin: 0 auto 12px;
  background: var(--brand);
  color: #fff;
  border-radius: 14px;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  overflow: hidden;
}
.auth-brand .logo-img {
  object-fit: cover;
  padding: 0;
  background: #fff;
  display: block;
}
.auth-brand h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin: 0 0 4px;
}
.auth-brand p { color: var(--text-muted); font-size: 0.85rem; margin: 0; }

.auth-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.auth-topbar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
}
.auth-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.auth-topbar-user {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ========== Public site ========== */
.public-nav {
  background: var(--brand);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.public-nav a { color: rgba(255,255,255,0.9); }
.public-nav .brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}
.hero {
  background:
    linear-gradient(135deg, rgba(30, 58, 138, 0.92), rgba(14, 165, 233, 0.75)),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="80" cy="20" r="40" fill="rgba(255,255,255,0.05)"/></svg>');
  background-size: cover;
  color: #fff;
  padding: 72px 24px 64px;
  text-align: center;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 12px;
  letter-spacing: -0.03em;
}
.hero p { opacity: 0.9; max-width: 520px; margin: 0 auto 28px; }
.search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.search-bar .form-control { flex: 1; min-width: 120px; border: 1px solid #e2e8f0; }
.search-bar .btn { white-space: nowrap; }

.hotel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 32px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.hotel-card {
  background: var(--bg-elevated);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.hotel-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(15,23,42,0.1); }
.hotel-card-img {
  height: 160px;
  background: linear-gradient(135deg, #1e3a8a, #0ea5e9);
  display: grid; place-items: center;
  color: rgba(255,255,255,0.5);
  font-size: 2rem;
}
.hotel-card-body { padding: 16px; }
.hotel-card-body h3 { margin: 0 0 6px; font-size: 1.05rem; }
.hotel-card-body .meta { color: var(--text-muted); font-size: 0.85rem; }

.room-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}
.room-tile {
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.room-tile .num { font-weight: 700; font-size: 1rem; }
.room-tile.available { border-color: #10b981; background: #ecfdf5; }
.room-tile.occupied { border-color: #3b82f6; background: #eff6ff; }
.room-tile.cleaning { border-color: #f59e0b; background: #fffbeb; }
.room-tile.maintenance { border-color: #8b5cf6; background: #f5f3ff; }
.room-tile.reserved { border-color: #f97316; background: #fff7ed; }

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.actions-cell form { display: inline; margin: 0; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.filter-bar .form-control {
  width: auto;
  min-width: 130px;
}

.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px 12px;
}
.perm-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  cursor: pointer;
}

.text-muted { color: var(--text-muted, #6b7280); }
.text-success { color: #059669; }
.text-danger { color: #dc2626; }

/* Mobile */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrap { margin-left: 0; }
  .menu-toggle { display: block; }
  .sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 90;
  }
  .sidebar-overlay.show { display: block; }
  .content { padding: 16px; }
  .search-bar { flex-direction: column; }
  .form-row { grid-template-columns: 1fr !important; }
  .card-header {
    flex-wrap: wrap;
    gap: 10px;
  }
  .filter-bar { width: 100%; }
  .filter-bar .form-control {
    flex: 1 1 100%;
    min-width: 0;
  }
  .data th, .data td { white-space: nowrap; }
  .actions-cell { flex-direction: column; align-items: stretch; }
  .actions-cell .btn { width: 100%; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .sidebar { width: min(280px, 88vw); }
  .content { padding: 12px; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeUp 0.4s ease forwards; }

/* Live support chat */
.support-chat-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
}
.support-chat-widget__toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--primary, #2563eb);
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  cursor: pointer;
  position: relative;
  font-size: 1.4rem;
}
.support-chat-widget__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #dc2626;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
.support-chat-widget__panel {
  position: absolute;
  right: 0;
  bottom: 68px;
  width: min(360px, calc(100vw - 32px));
  height: 420px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.support-chat-widget__panel.is-closed,
.support-chat-widget__panel[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.support-chat-widget.is-open .support-chat-widget__toggle {
  transform: scale(0.95);
  opacity: 0.9;
}
.support-chat-widget__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  background: var(--surface, #f9fafb);
  flex-shrink: 0;
}
.support-chat-widget__status { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.support-chat-widget__status.is-online { color: #059669; }
.support-chat-widget__head-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.support-chat-widget__minimize,
.support-chat-widget__close {
  border: none;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.support-chat-widget__minimize:hover,
.support-chat-widget__close:hover {
  background: var(--border, #e5e7eb);
  color: var(--text, #111);
}
.support-chat-widget__offline,
.support-chat-widget__body {
  padding: 16px;
  flex: 1;
  overflow: auto;
}
.support-chat-widget__body {
  display: flex;
  flex-direction: column;
  padding: 0;
  min-height: 0;
}
.support-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
}
.support-chat-msg { max-width: 85%; }
.support-chat-msg.is-hotel { align-self: flex-end; }
.support-chat-msg.is-admin { align-self: flex-start; }
.support-chat-msg__meta { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 4px; }
.support-chat-msg__body {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
  word-break: break-word;
}
.support-chat-msg.is-hotel .support-chat-msg__body {
  background: var(--primary, #2563eb);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.support-chat-msg.is-admin .support-chat-msg__body {
  background: var(--surface, #f3f4f6);
  color: var(--text, #111);
  border-bottom-left-radius: 4px;
}
.support-chat-compose {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border, #e5e7eb);
  align-items: flex-end;
}
.support-chat-compose textarea { flex: 1; resize: none; min-height: 44px; }
.support-chat-admin__layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  min-height: 520px;
}
.support-chat-admin__list .card-body { max-height: 560px; overflow-y: auto; }
.support-chat-admin__panel { display: flex; flex-direction: column; min-height: 520px; }
.support-chat-admin__panel .support-chat-messages { flex: 1; max-height: none; min-height: 320px; }
.support-chat-session-item {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  text-decoration: none;
  color: inherit;
}
.support-chat-session-item:hover { background: var(--surface, #f9fafb); }
.support-chat-session-item.active { background: rgba(37, 99, 235, 0.08); border-left: 3px solid var(--primary, #2563eb); }
.support-chat-session-item__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.support-chat-session-item__preview { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }
.support-chat-session-item__meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.support-chat-badge {
  background: #dc2626;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 7px;
}
.support-online-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}
.support-chat-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.support-chat-empty { display: flex; align-items: center; justify-content: center; min-height: 320px; color: var(--text-muted); }

@media (max-width: 900px) {
  .support-chat-admin__layout { grid-template-columns: 1fr; }
}
.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }
