/* Tokens live in css/connexa.css — this file defines COMPONENTS only.
   Do not reintroduce a :root block here; two token sources is what made
   a colour change require edits in two files. */
/* ============================================================
   HotelXNet — Global Stylesheet
   Simple HTML + CSS, no framework
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Scrollbars ───────────────────────────────────────────────
   Defining any ::-webkit-scrollbar rule switches Chromium/Edge to a
   fully CSS-rendered scrollbar instead of deferring to the OS theme —
   this is what removes the classic up/down arrow buttons some Windows
   scrollbar themes inject, without hiding the scrollbar itself. */
* {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background-color: #94a3b8;
}
::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
::-webkit-scrollbar-corner {
  background: transparent;
}

/* ── Dark Theme ──────────────────────────────────────────────
   Toggled by `data-theme="dark"` on <html> (see js/layout.js
   HXLayout.setDarkMode / the inline bootstrap script in every page's
   <head>). The gray scale is a mirror-swap of the light-mode "slate"
   scale (50<->900, 100<->800, 200<->700, 300<->600, 400<->500) — since
   it's the same physical color values just reassigned, contrast
   relationships that already worked in light mode (e.g. gray-400/500
   text, which the always-dark .sidebar already relies on) keep working
   in dark mode too. Components that are intentionally dark in BOTH
   themes (.sidebar, .sidebar-flyout-tooltip, .badge-dark,
   #scrollTopBtn) are pinned back to their original literal colors
   below so the gray-scale flip doesn't lighten them. */

:root[data-theme='dark'] .sidebar,
:root[data-theme='dark'] .sidebar-flyout-tooltip {
  background: #0f172a;
}
:root[data-theme='dark'] .sidebar-flyout-tooltip::before {
  border-right-color: #0f172a;
}
:root[data-theme='dark'] .badge-dark,
:root[data-theme='dark'] #scrollTopBtn {
  background: #1e293b;
}
:root[data-theme='dark'] * {
  scrollbar-color: #475569 transparent;
}
:root[data-theme='dark'] ::-webkit-scrollbar-thumb {
  background-color: #475569;
}
:root[data-theme='dark'] ::-webkit-scrollbar-thumb:hover {
  background-color: #64748b;
}

html,
body {
  height: 100%;
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--gray-800);
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ── App Shell ───────────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--gray-900);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: width 0.25s ease;
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-brand:hover {
  text-decoration: none;
}
.sidebar-brand-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.sidebar-brand-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}
.sidebar-brand-sub {
  font-size: 10px;
  color: var(--gray-400);
  font-weight: 500;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 0 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gray-500);
  padding: 12px 16px 4px;
  white-space: nowrap;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  cursor: pointer;
  border-radius: 0;
  transition:
    background 0.15s,
    color 0.15s;
  color: var(--gray-400);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  position: relative;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-decoration: none;
}
.nav-item.active {
  background: rgba(37, 99, 235, 0.25);
  color: #fff;
  border-right: 3px solid var(--primary);
}
.nav-group {
  margin-bottom: 2px;
}
.nav-group.open .nav-group-toggle {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.nav-group.active .nav-group-toggle {
  background: rgba(37, 99, 235, 0.18);
  color: #fff;
}
.nav-group-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  cursor: pointer;
  color: var(--gray-400);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  transition:
    background 0.15s,
    color 0.15s;
}
.nav-group-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.nav-group-chevron {
  font-size: 11px;
  color: var(--gray-500);
  transition: transform 0.2s ease;
}
.nav-group.open .nav-group-chevron {
  transform: rotate(90deg);
  color: #fff;
}
.nav-submenu {
  display: none;
  padding: 2px 0 8px;
}
.nav-group.open .nav-submenu {
  display: block;
}
.nav-subgroup {
  margin: 2px 0 2px 44px;
}
.nav-subgroup.active > .nav-subgroup-toggle,
.nav-subgroup.open > .nav-subgroup-toggle {
  color: #fff;
}
.nav-subgroup-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px 0 0 10px;
  color: var(--gray-400);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
.nav-subgroup-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.nav-subgroup-chevron {
  margin-left: auto;
  font-size: 10px;
  color: var(--gray-500);
  transition: transform 0.2s ease;
}
.nav-subgroup.open .nav-subgroup-chevron {
  transform: rotate(90deg);
  color: #fff;
}
.nav-subsubmenu {
  display: none;
  padding: 2px 0 4px;
}
.nav-subgroup.open .nav-subsubmenu {
  display: block;
}
.nav-subitem {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 2px 44px;
  padding: 8px 12px;
  border-radius: 10px 0 0 10px;
  color: var(--gray-400);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  transition:
    background 0.15s,
    color 0.15s;
}
.nav-subitem:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-decoration: none;
}
.nav-subitem.active {
  background: rgba(37, 99, 235, 0.25);
  color: #fff;
  border-right: 3px solid var(--primary);
}
.nav-subitem-nested {
  margin-left: 18px;
}
.nav-subitem-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
  flex-shrink: 0;
}
.nav-icon {
  width: 20px;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}
.nav-label {
  flex: 1;
}
.nav-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  flex-shrink: 0;
}
.nav-badge.success {
  background: var(--success-500);
}
.nav-badge.warning {
  background: var(--warning-500);
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user-info {
  min-width: 0;
}
.sidebar-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--indigo));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.sidebar-user-role {
  font-size: 11px;
  color: var(--gray-400);
}
.sidebar-footer-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.sidebar-footer-btn {
  flex: 1;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
  text-decoration: none;
}
.sidebar-footer-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  text-decoration: none;
}
.sidebar-footer-btn.logout {
  color: #fecaca;
  border-color: rgba(220, 38, 38, 0.24);
  background: rgba(220, 38, 38, 0.12);
}
.sidebar-footer-btn.logout:hover {
  background: rgba(220, 38, 38, 0.18);
}

/* ── Topbar ──────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  z-index: 90;
  transition: left 0.25s ease;
}

.topbar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-500);
  font-size: 16px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.topbar-toggle:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-500);
  flex: 1;
}
.crumb-sep {
  color: var(--gray-300);
}
.crumb-active {
  color: var(--gray-800);
  font-weight: 600;
}

.topbar-search {
  position: relative;
  flex: 0 0 280px;
}
.topbar-search input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 13px;
  background: var(--gray-50);
  color: var(--gray-800);
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.topbar-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: var(--surface);
}
.topbar-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 13px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar-role-badge {
  background: var(--primary-50);
  color: var(--primary);
  border: 1px solid var(--primary-100);
  border-radius: 99px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.topbar-action-btn {
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  color: var(--gray-500);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition:
    background 0.15s,
    color 0.15s;
}
.topbar-action-btn:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}
.topbar-notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid #fff;
}
.topbar-user-menu {
  position: relative;
}
.topbar-user-trigger {
  min-width: 0;
  height: 36px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: var(--surface);
  color: var(--gray-700);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    background 0.15s;
}
.topbar-user-trigger:hover,
.topbar-user-menu.open .topbar-user-trigger {
  border-color: var(--primary-100);
  background: var(--gray-50);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}
.topbar-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--indigo));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.topbar-user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.topbar-user-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.1;
}
.topbar-user-role-text {
  font-size: 10px;
  color: var(--gray-500);
  line-height: 1.1;
}
.topbar-user-chevron {
  color: var(--gray-400);
  font-size: 11px;
}
.topbar-user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 190px;
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
  z-index: 120;
}
.topbar-user-menu.open .topbar-user-dropdown {
  display: block;
}
.topbar-user-dropdown a,
.topbar-user-dropdown button {
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 8px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.topbar-user-dropdown a:hover,
.topbar-user-dropdown button:hover {
  background: var(--gray-50);
  text-decoration: none;
}
.topbar-user-dropdown .logout-action {
  color: var(--danger-600);
}

/* ── Main Content ────────────────────────────────────────── */
.main-content {
  /* .sidebar and .topbar are both position:fixed, so this is the only
     actual flex item inside .app-shell — without flex-grow it would just
     shrink to fit its own content and leave the rest of the row empty. */
  flex: 1 1 auto;
  min-width: 0;
  margin-left: var(--sidebar-width);
  margin-top: var(--topbar-height);
  min-height: calc(100vh - var(--topbar-height));
  padding: 28px var(--content-padding-x);
  transition: margin-left 0.25s ease;
}

body.page-content-wide {
  --content-padding-x: clamp(16px, 1.5vw, 22px);
}

body.page-content-comfort {
  --content-padding-x: clamp(18px, 1.9vw, 24px);
}

body.page-content-compact {
  --content-padding-x: clamp(20px, 2.3vw, 30px);
}

/* ── Page Header ─────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
}
.page-subtitle {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 4px;
}
.page-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.page-header-right > * {
  max-width: 100%;
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
  flex-wrap: wrap;
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
}
.card-body {
  padding: 16px 20px;
}
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
  background: var(--gray-50);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── KPI Cards ───────────────────────────────────────────── */
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s;
}
.kpi-card:hover {
  box-shadow: var(--shadow-md);
}
.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.kpi-icon.blue {
  background: var(--primary-50);
  color: var(--primary);
}
.kpi-icon.teal {
  background: var(--teal-100);
  color: var(--teal-600);
}
.kpi-icon.green {
  background: var(--success-50);
  color: var(--success-600);
}
.kpi-icon.orange {
  background: var(--orange-100);
  color: var(--orange);
}
.kpi-icon.red {
  background: var(--danger-50);
  color: var(--danger-600);
}
.kpi-icon.indigo {
  background: var(--indigo-100);
  color: var(--indigo);
}
.kpi-icon.gray {
  background: var(--gray-100);
  color: var(--gray-500);
}
.kpi-body {
  flex: 1;
  min-width: 0;
}
.kpi-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
}
.kpi-label {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
  font-weight: 500;
}
.kpi-trend {
  font-size: 11px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}
.kpi-trend.up {
  color: var(--success-600);
}
.kpi-trend.down {
  color: var(--danger-600);
}

/* ── Grid ────────────────────────────────────────────────── */
.grid {
  display: grid;
}
.grid-cols-1 {
  grid-template-columns: 1fr;
}
.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}
.grid-cols-5 {
  grid-template-columns: repeat(5, 1fr);
}
.gap-3 {
  gap: 12px;
}
.gap-4 {
  gap: 16px;
}
.gap-5 {
  gap: 20px;
}
.gap-6 {
  gap: 24px;
}
.mb-3 {
  margin-bottom: 12px;
}
.mb-4 {
  margin-bottom: 16px;
}
.mb-5 {
  margin-bottom: 20px;
}
.mb-6 {
  margin-bottom: 24px;
}
.mt-3 {
  margin-top: 12px;
}
.mt-4 {
  margin-top: 16px;
}
.mt-5 {
  margin-top: 20px;
}
.span-2 {
  grid-column: span 2;
}

/* ── Flex helpers ────────────────────────────────────────── */
.flex {
  display: flex;
}
.flex-wrap {
  flex-wrap: wrap;
}
.items-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-2 {
  gap: 8px;
}
.ml-auto {
  margin-left: auto;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  border: 1.5px solid transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover {
  text-decoration: none;
}
.btn i {
  flex-shrink: 0;
}
.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}
.btn-lg {
  padding: 10px 22px;
  font-size: 14px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}
.btn-secondary {
  background: var(--surface);
  color: var(--gray-700);
  border-color: var(--gray-300);
}
.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}
.btn-success {
  background: var(--success-600);
  color: #fff;
  border-color: var(--success-600);
}
.btn-success:hover {
  background: #15803d;
}
.btn-danger {
  background: var(--danger-600);
  color: #fff;
  border-color: var(--danger-600);
}
.btn-danger:hover {
  background: #b91c1c;
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary-50);
}
.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--gray-100);
}
.btn-teal {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.btn-teal:hover {
  background: #0f766e;
}
.btn-warning {
  background: var(--warning);
  color: #fff;
  border-color: var(--warning);
}
.btn-warning:hover {
  background: #b45309;
}
.btn-danger-outline {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
.btn-danger-outline:hover {
  background: var(--danger-50);
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-sm {
  padding: 2px 6px;
  font-size: 10px;
}
.badge-lg {
  padding: 5px 12px;
  font-size: 12px;
}
.badge-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.badge-primary {
  background: var(--primary-100);
  color: var(--primary-700);
}
.badge-success {
  background: var(--success-100);
  color: var(--success-600);
}
.badge-warning {
  background: var(--warning-100);
  color: var(--warning-600);
}
.badge-danger {
  background: var(--danger-100);
  color: var(--danger-600);
}
.badge-gray {
  background: var(--gray-100);
  color: var(--gray-600);
}
.badge-teal {
  background: var(--teal-100);
  color: var(--teal-600);
}
.badge-dark {
  background: var(--gray-800);
  color: #fff;
}
.badge-indigo {
  background: var(--indigo-100);
  color: var(--indigo);
}
.status-active {
  background: var(--success-100);
  color: var(--success-600);
}
.status-inactive {
  background: var(--gray-100);
  color: var(--gray-500);
}
.status-pending {
  background: var(--warning-100);
  color: var(--warning-600);
}
.status-expired {
  background: var(--danger-100);
  color: var(--danger-600);
}
.status-draft {
  background: var(--gray-100);
  color: var(--gray-500);
}
.status-stopsale {
  background: var(--danger-50);
  color: var(--danger-600);
}

/* ── Chips ───────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--primary-50);
  color: var(--primary);
  border: 1px solid var(--primary-100);
  font-family: 'Courier New', monospace;
}
.chip.gray {
  background: var(--gray-100);
  color: var(--gray-600);
  border-color: var(--gray-200);
}
.chip.teal {
  background: var(--teal-100);
  color: var(--teal-600);
  border-color: var(--teal-100);
  font-family: inherit;
}
.chip.orange {
  background: var(--orange-100);
  color: var(--orange);
  border-color: var(--orange-100);
  font-family: inherit;
}

/* ── Tables ──────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  background: var(--gray-50);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--gray-500);
  text-align: left;
  white-space: nowrap;
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
  color: var(--gray-800);
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}
.data-table tbody tr:hover td {
  background: var(--gray-50);
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
  flex-wrap: wrap;
}
.table-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.table-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.table-search {
  position: relative;
  width: 100%;
  max-width: 320px;
}
.table-search input {
  height: 34px;
  padding: 0 12px 0 32px;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius-sm);
  font-size: 13px;
  outline: none;
  min-width: 0;
  width: 100%;
  transition: border-color 0.15s;
  background: var(--surface);
  color: var(--gray-800);
}
.table-search input:focus {
  border-color: var(--primary);
}
.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 12px;
}

.table-actions {
  display: flex;
  gap: 4px;
}
.table-action-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--gray-200);
  background: var(--surface);
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.table-action-btn:hover {
  background: var(--gray-50);
  color: var(--gray-800);
}
.table-action-btn.edit:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.table-action-btn.delete:hover {
  border-color: var(--danger);
  color: var(--danger);
}
.table-action-btn.view:hover {
  border-color: var(--teal);
  color: var(--teal);
}

/* ── Pagination ──────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 8px;
}
.pagination-info {
  font-size: 12px;
  color: var(--gray-500);
}
.pagination-btns {
  display: flex;
  gap: 4px;
}
.page-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--gray-200);
  background: var(--surface);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.page-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── Forms ───────────────────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}
.label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.label-required::after {
  content: ' *';
  color: var(--danger-600);
}
.form-control {
  display: block;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius-sm);
  font-size: 13px;
  color: var(--gray-800);
  background: var(--surface);
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  font-family: inherit;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
textarea.form-control {
  height: auto;
  min-height: 80px;
  padding: 10px 12px;
  resize: vertical;
}
select.form-control {
  cursor: pointer;
}
.form-hint {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 4px;
}
.form-error {
  font-size: 11px;
  color: var(--danger-600);
  margin-top: 4px;
}
.form-error.hidden {
  display: none;
}

/* A bare .form-row lays its fields out side by side. Every other module
   passes an explicit cols-N (which still wins on specificity) or sets its
   own template inline; without a default, the ticketing forms — which pass
   neither — collapsed to one column and stacked every field full-width. */
.form-row {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.form-row.cols-2 {
  grid-template-columns: 1fr 1fr;
}
.form-row.cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}
.form-row.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}
.form-row.cols-5 {
  grid-template-columns: repeat(5, 1fr);
}
.form-row > * {
  min-width: 0;
}

/* ── Searchable checkbox multi-select ("ms-multi") ──────────────
   Chip-field + checkbox-menu widget: used in place of a native
   <select multiple> anywhere a searchable, chip-based picker is needed
   (Contract Room Types, Hotel Room Types, Channel Manager hotel picker, …). */
.ms-multi {
  position: relative;
}
.ms-field {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 38px;
  padding: 5px 30px 5px 10px;
  cursor: pointer;
  user-select: none;
}
.ms-multi.open .ms-field {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.ms-chips {
  display: contents;
}
.ms-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 6px 2px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-700);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
}
.ms-chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.15);
  color: var(--primary-700);
  font-size: 9px;
  cursor: pointer;
}
.ms-chip-x:hover {
  background: var(--primary-600);
  color: #fff;
}
.ms-placeholder {
  color: var(--gray-400);
  font-size: 13px;
}
.ms-caret {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--gray-400);
  pointer-events: none;
  transition: transform 0.15s ease;
}
.ms-multi.open .ms-caret {
  transform: translateY(-50%) rotate(180deg);
}
.ms-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}
.ms-multi.open .ms-menu {
  display: block;
}
.ms-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  color: var(--gray-700);
}
.ms-option:hover {
  background: var(--gray-50);
}
.ms-option.selected {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary-700);
  font-weight: 600;
}
.ms-option input[type='checkbox'] {
  margin: 0;
  accent-color: var(--primary-600);
}
.ms-search-wrap {
  padding: 6px 8px;
  border-bottom: 1px solid var(--gray-100);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.ms-search-wrap input {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  outline: none;
  color: var(--gray-700);
  background: var(--surface);
}
.ms-search-wrap input:focus {
  border-color: var(--primary-400);
}

.filter-select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius-sm);
  font-size: 13px;
  color: var(--gray-700);
  background: var(--surface);
  cursor: pointer;
  outline: none;
}
.filter-select:focus {
  border-color: var(--primary);
}
.filter-select--locked {
  background-color: var(--gray-50);
  color: var(--gray-800);
  cursor: not-allowed;
  opacity: 1;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 10px;
  color: var(--gray-400);
  font-size: 12px;
  pointer-events: none;
}
.input-group .form-control {
  padding-left: 32px;
}
.input-icon-right {
  position: absolute;
  right: 10px;
}

.input-addon {
  display: flex;
}
.input-addon-text {
  padding: 0 10px;
  height: 36px;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-right: none;
  border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
  font-size: 12px;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-weight: 600;
}
.input-addon .form-control {
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

/* ── Toggle Switch ───────────────────────────────────────── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--gray-300);
  border-radius: 99px;
  transition: 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
  box-shadow: var(--shadow-sm);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}
.toggle-switch.teal input:checked + .toggle-slider {
  background: var(--teal);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--border-radius-sm);
  border-width: 1px;
  border-style: solid;
  font-size: 13px;
}
.alert-icon {
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 1px;
}
.alert-content {
  flex: 1;
}
.alert-warning {
  background: var(--warning-50);
  border-color: var(--warning-300);
  color: var(--gray-700);
}
.alert-warning .alert-icon {
  color: var(--warning-600);
}
.alert-info {
  background: var(--primary-50);
  border-color: var(--primary-100);
  color: var(--gray-700);
}
.alert-info .alert-icon {
  color: var(--primary);
}
.alert-success {
  background: var(--success-50);
  border-color: var(--success-300);
  color: var(--gray-700);
}
.alert-success .alert-icon {
  color: var(--success-600);
}
.alert-danger {
  background: var(--danger-50);
  border-color: var(--danger-300);
  color: var(--gray-700);
}
.alert-danger .alert-icon {
  color: var(--danger-600);
}

/* ── Tabs ────────────────────────────────────────────────── */
.tabs-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-color);
  overflow-x: auto;
  overflow-y: hidden;
}
.tab-item {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.tab-item:hover {
  color: var(--gray-800);
}
.tab-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
}

.tabs-pills {
  display: inline-flex;
  background: var(--gray-100);
  border-radius: 8px;
  padding: 3px;
}
.tab-pill {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s;
}
.tab-pill.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ── Progress ────────────────────────────────────────────── */
.progress {
  height: 8px;
  background: var(--gray-100);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}
.progress-bar.success {
  background: var(--success-500);
}
.progress-bar.warning {
  background: var(--warning-500);
}
.progress-bar.danger {
  background: var(--danger-500);
}
.progress-bar.primary {
  background: var(--primary);
}

/* ── Activity Feed ───────────────────────────────────────── */
.activity-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}
.activity-item:last-child {
  border-bottom: none;
}
.activity-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--indigo));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.activity-body {
  flex: 1;
}
.activity-text {
  font-size: 12.5px;
  color: var(--gray-700);
  line-height: 1.5;
}
.activity-meta {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 2px;
}

/* ── Chart Container ─────────────────────────────────────── */
.chart-container {
  position: relative;
}

/* ── Steps (Hotel Edit wizard) ───────────────────────────── */
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  position: relative;
}
.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: var(--gray-200);
  z-index: 0;
}
.step-item.active::after {
  background: var(--primary);
}
.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  z-index: 1;
  background: var(--gray-200);
  color: var(--gray-500);
  border: 2px solid var(--gray-200);
  transition: all 0.2s;
}
.step-item.active .step-circle {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.step-item.completed .step-circle {
  background: var(--success-500);
  color: #fff;
  border-color: var(--success-500);
}
.step-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  text-align: center;
}
.step-item.active .step-label {
  color: var(--primary);
}

/* ── Map Placeholder ─────────────────────────────────────── */
.map-placeholder {
  height: 180px;
  background: var(--gray-100);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--gray-400);
}
.map-placeholder-icon {
  font-size: 36px;
}
.map-placeholder-text {
  font-size: 13px;
  font-weight: 500;
}

/* ── Upload Zone ─────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--gray-300);
  border-radius: 10px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.upload-zone:hover {
  border-color: var(--primary);
  background: var(--primary-50);
}
.upload-zone-icon {
  font-size: 36px;
  color: var(--gray-300);
  margin-bottom: 10px;
}
.upload-zone-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
}
.upload-zone-hint {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 4px;
}

/* ── Star Rating ─────────────────────────────────────────── */
.star-rating {
  display: flex;
  gap: 3px;
}
.star {
  font-size: 20px;
  color: var(--warning-500);
  cursor: pointer;
}
.star.empty {
  color: var(--gray-300);
}

/* ── Rule Cards ──────────────────────────────────────────── */
.rule-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 16px;
}

/* ── Divider Label ───────────────────────────────────────── */
.divider-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--gray-400);
  margin: 20px 0;
}
.divider-label::before,
.divider-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

/* ── Promo Cards ─────────────────────────────────────────── */
.promo-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s;
}
.promo-card:hover {
  box-shadow: var(--shadow-md);
}

/* ── Availability Calendar ───────────────────────────────── */
.avail-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-day-header {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  padding-bottom: 6px;
}
.cal-day {
  aspect-ratio: 1;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.cal-day.available {
  background: var(--success-50);
  color: var(--success-600);
  border-color: var(--success-300);
}
.cal-day.limited {
  background: var(--warning-50);
  color: var(--warning-600);
  border-color: var(--warning-300);
}
.cal-day.soldout {
  background: var(--danger-50);
  color: var(--danger-600);
  border-color: var(--danger-300);
}
.cal-day.stopsale {
  background: var(--gray-100);
  color: var(--gray-400);
  border-color: var(--gray-300);
}
.cal-day.empty {
  background: transparent;
  cursor: default;
}

/* ── Rate Grid ───────────────────────────────────────────── */
.rate-grid-wrapper {
  overflow-x: auto;
  padding: 12px;
}
.rate-grid {
  border-collapse: collapse;
  font-size: 12px;
}
.rate-grid th {
  background: var(--gray-50);
  padding: 8px 10px;
  border: 1px solid var(--gray-200);
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  white-space: nowrap;
}
.rate-grid td {
  border: 1px solid var(--gray-200);
  padding: 6px 10px;
  min-width: 80px;
}
.rate-grid .room-col {
  font-weight: 600;
  color: var(--gray-800);
  white-space: nowrap;
  padding-right: 16px;
}
.rate-cell {
  cursor: pointer;
  transition: background 0.1s;
}
.rate-cell:hover {
  background: var(--primary-50);
}
.rate-cell.available {
  background: var(--success-50);
}
.rate-cell.low {
  background: var(--warning-100);
}
.rate-cell.soldout {
  background: var(--danger-50);
}
.rate-cell.stopsale {
  background: var(--gray-100);
}

/* ── Policy Timeline ─────────────────────────────────────── */
.policy-timeline {
  margin: 12px 0;
}
.timeline-bar {
  display: flex;
  align-items: center;
  gap: 0;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 6px;
}
.timeline-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  transition: filter 0.15s;
}
.timeline-seg:hover {
  filter: brightness(0.92);
}

/* ── Log Viewer ──────────────────────────────────────────── */
.log-viewer {
  background: #0f172a;
  border-radius: 8px;
  padding: 14px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.7;
  max-height: 280px;
  overflow-y: auto;
  color: #94a3b8;
}
.log-entry.error {
  color: #f87171;
}
.log-entry.warning {
  color: #fbbf24;
}
.log-entry.success {
  color: #4ade80;
}
.log-entry.info {
  color: #60a5fa;
}

/* ── Agent Steps ─────────────────────────────────────────── */
.agent-tab-pane {
  display: none;
}
.agent-tab-pane.active {
  display: block;
}
.bulk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Checkbox Group ──────────────────────────────────────── */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-700);
  cursor: pointer;
}

/* ── Text Helpers ────────────────────────────────────────── */
.text-sm {
  font-size: 12px;
}
.text-xs {
  font-size: 11px;
}
.text-gray {
  color: var(--gray-500);
}
.text-primary {
  color: var(--primary);
}
.text-teal {
  color: var(--teal);
}
.text-warning {
  color: var(--warning-600);
}
.text-danger {
  color: var(--danger-600);
}
.font-500 {
  font-weight: 500;
}
.font-600 {
  font-weight: 600;
}
.font-700 {
  font-weight: 700;
}
.cursor-pointer {
  cursor: pointer;
}

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open {
  display: flex;
}
.modal {
  background: var(--surface);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  /* Sticky header/footer, scrollable body only — the modal box itself never
     scrolls (only .modal-body does), so a tall modal never shows two
     scrollbars and the header/footer stay visible while its content scrolls. */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.2s ease;
}
/* `.modal-xl` existed only in design-system.css, which no page loads — so
   every popup asking for xl silently fell back to the 520px default and
   crushed its content into a column. It belongs here, next to the `.modal`
   it modifies. Viewport-capped so a wide modal still fits a laptop screen.
   `.modal-sm` is deliberately left undefined: the confirm dialogs that ask
   for it read fine at the 520px default, and defining it would make them
   narrower than they are today. */
.modal-lg {
  max-width: min(720px, 94vw);
}
.modal-xl {
  max-width: min(1180px, 94vw);
}
/* Room Management "Add Product Option" + Contract "Add Room Type" modal — matches
   the real app's .modal--room-form exactly (public/css/style.css). */
.modal.modal--room-form {
  max-width: min(920px, 96vw);
}
.modal-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
}
.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
}
.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}
.modal-body {
  padding: 20px 24px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.modal-footer {
  flex-shrink: 0;
  padding: 14px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Toast ───────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  animation: slideUp 0.2s ease;
  font-size: 13px;
  font-weight: 500;
}
.toast.success {
  border-left: 4px solid var(--success-500);
}
.toast.error {
  border-left: 4px solid var(--danger-500);
}
.toast.warning {
  border-left: 4px solid var(--warning-500);
}
.toast.info {
  border-left: 4px solid var(--primary);
}

/* ── Sidebar Collapsed ───────────────────────────────────── */
.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}
.sidebar.collapsed .sidebar-brand-name,
.sidebar.collapsed .sidebar-brand-sub,
.sidebar.collapsed .sidebar-section-label,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .nav-group-chevron,
.sidebar.collapsed .nav-subgroup-chevron,
.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .sidebar-footer-btn span {
  display: none;
}
.sidebar.collapsed .nav-item,
.sidebar.collapsed .nav-group-toggle {
  padding: 10px;
  justify-content: center;
}
.sidebar.collapsed .nav-submenu {
  display: none !important;
}
.sidebar.collapsed .nav-icon {
  width: auto;
}
.sidebar.collapsed .sidebar-brand {
  padding: 18px 14px;
  justify-content: center;
}
.sidebar.collapsed .sidebar-footer {
  padding: 12px;
  justify-content: center;
}
.sidebar.collapsed .sidebar-footer-actions {
  flex-direction: column;
}
.sidebar.collapsed .sidebar-footer-btn {
  width: 40px;
  flex: none;
  padding: 0;
}

.app-shell.collapsed .topbar {
  left: var(--sidebar-collapsed);
}
.app-shell.collapsed .main-content {
  margin-left: var(--sidebar-collapsed);
}

/* ── Sidebar Collapsed — hover flyout tooltip ────────────────
   Shown on hover/focus of a nav icon when the sidebar is collapsed
   on desktop, since the label text itself is hidden in that state. */
.sidebar-flyout-tooltip {
  position: fixed;
  z-index: 200;
  padding: 6px 12px;
  background: var(--gray-900);
  color: var(--gray-50);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%);
  transition:
    opacity 0.12s ease,
    visibility 0.12s ease;
}
.sidebar-flyout-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
}
.sidebar-flyout-tooltip::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-right-color: var(--gray-900);
}

/* ── Mobile Overlay (sidebar backdrop on small screens) ──── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 99;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sidebar-overlay.open {
  display: block;
}

/* ── Scroll to top button ─────────────────────────────────── */
#scrollTopBtn {
  position: fixed;
  bottom: 28px;
  left: calc(var(--sidebar-width) + 24px);
  width: 36px;
  height: 36px;
  background: var(--gray-800);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80;
  box-shadow: var(--shadow-md);
  transition:
    background 0.15s,
    left 0.25s;
}
#scrollTopBtn:hover {
  background: var(--primary);
}
#scrollTopBtn.visible {
  display: flex;
}
.app-shell.collapsed #scrollTopBtn {
  left: calc(var(--sidebar-collapsed) + 24px);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1280px) {
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-cols-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 1024px) {
  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .topbar-search {
    display: none;
  }
  .topbar-user-meta {
    display: none;
  }
  .table-search {
    max-width: 100%;
  }
}
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition:
      transform 0.25s ease,
      width 0.25s ease;
    z-index: 200;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .topbar {
    left: 0 !important;
  }
  .main-content {
    margin-left: 0 !important;
    padding: 16px;
  }
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4,
  .grid-cols-5 {
    grid-template-columns: 1fr;
  }
  .form-row.cols-2,
  .form-row.cols-3,
  .form-row.cols-4,
  .form-row.cols-5 {
    grid-template-columns: 1fr;
  }
  .page-header {
    flex-direction: column;
  }
  .page-header-right {
    width: 100%;
  }
  .page-header-right > * {
    flex: 1 1 auto;
  }
  .table-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .table-toolbar-left,
  .table-toolbar-right {
    width: 100%;
  }
  .span-2 {
    grid-column: span 1;
  }
  #scrollTopBtn {
    left: 16px;
  }
  .topbar-role-badge {
    display: none;
  }
  .topbar-user-trigger {
    padding-right: 10px;
  }
  .topbar-actions {
    gap: 6px;
  }
  .topbar-user-dropdown {
    width: min(220px, calc(100vw - 32px));
  }
  .modal-overlay {
    padding: 14px;
  }
  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
  .modal-footer > * {
    flex: 1 1 auto;
    justify-content: center;
  }
}
@media (max-width: 480px) {
  .main-content {
    padding: 12px;
  }
  .kpi-card {
    padding: 14px;
  }
  .page-title {
    font-size: 18px;
  }
  .modal {
    max-width: 100%;
    margin: 12px;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
  .card-header,
  .card-body,
  .card-footer {
    padding-left: 14px;
    padding-right: 14px;
  }
  .topbar {
    padding: 0 12px;
    gap: 10px;
  }
  .topbar-breadcrumb {
    min-width: 0;
    overflow: hidden;
  }
  .topbar-breadcrumb span {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
}

/* ── Print ───────────────────────────────────────────────── */
@media print {
  .sidebar,
  .topbar,
  .sidebar-overlay,
  #scrollTopBtn {
    display: none !important;
  }
  .main-content {
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* ════════════════════════════════════════════════════════════
   CONTRACT & PROMOTION ENHANCEMENTS
   Date breakup periods, applicable-date bar, direct supplements,
   event-period cancellation, park products, promo period grid.
   Tokens below are this build's own (:root in this file).
   ════════════════════════════════════════════════════════════ */

/* Applicable dates bar — visible while rates are being loaded */
.pricing-date-bar {
  position: sticky;
  top: var(--topbar-height);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 12px 18px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--primary-100);
  border-left: 4px solid var(--primary-600);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}
.pricing-date-bar .pdb-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 240px;
}
.pricing-date-bar .pdb-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--primary-700);
}
.pricing-date-bar .pdb-validity {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
}
.pricing-date-bar .pdb-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}
.pricing-date-bar .chip strong {
  font-weight: 700;
}

/* Per-row applicable dates badge under each period selector */
.hxn-rate-dates {
  display: inline-block;
  margin-top: 4px;
  white-space: nowrap;
}
.hxn-period-select {
  min-width: 190px;
}

/* Direct supplement preview — room rate + supplement = sell rate */
.hxn-preview {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hxn-preview-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 9px 12px;
  background: var(--gray-50);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-sm);
}
.hxn-preview-line code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--gray-700);
}
.hxn-preview-line strong {
  color: var(--gray-900);
}

/* Occupancy mode disables supplement entry (room-based only) */
#hxnSupplBody select:disabled,
#hxnSupplBody input:disabled {
  opacity: 0.6;
}

/* Park products */
#hxnParkCard {
  border-left: 3px solid var(--teal);
}

/* Promotion period grid (promotions modal) */
.promo-period-block {
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--primary-600);
  border-radius: var(--border-radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--surface);
}
.promo-period-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.promo-period-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-800);
}
.promo-period-dates {
  font-size: 12px;
  color: var(--primary-700);
  font-weight: 600;
}
.promo-pax-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.promo-pax-grid .label {
  font-size: 11px;
  margin-bottom: 3px;
}
.promo-mode-toggle {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: var(--gray-100);
  border-radius: var(--border-radius);
}
.promo-mode-toggle button {
  flex: 1;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--gray-500);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-family: inherit;
}
.promo-mode-toggle button.active {
  background: var(--surface);
  color: var(--primary-700);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 1024px) {
  .promo-pax-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pricing-date-bar {
    position: static;
  }
}

/* HXN: preview lines — space the inline chips/values */
.suppl-preview-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.suppl-preview-line:last-child {
  margin-bottom: 0;
}
