:root {
  --hms-sidebar-width: 240px;
  --hms-topbar-height: 56px;
  --hms-accent: #0d6efd;
  --hms-sidebar-bg: #ffffff;
  --hms-sidebar-border: #e5e7eb;
}

[data-bs-theme="dark"] {
  --hms-sidebar-bg: #1a1d21;
  --hms-sidebar-border: #2c3034;
}

html, body {
  min-height: 100%;
}

body {
  background-color: var(--bs-body-bg);
}

/* ---------- Theme toggle button (fixed top-right) ---------- */
.theme-toggle-btn {
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 1080;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* ---------- Topbar ---------- */
.app-topbar {
  height: var(--hms-topbar-height);
  background-color: var(--bs-body-bg);
  border-bottom: 1px solid var(--hms-sidebar-border);
  position: sticky;
  top: 0;
  z-index: 1040;
}

/* ---------- Sidebar ---------- */
.app-wrapper {
  min-height: calc(100vh - var(--hms-topbar-height));
}

.app-sidebar {
  width: var(--hms-sidebar-width);
  flex-shrink: 0;
  background-color: var(--hms-sidebar-bg);
  border-right: 1px solid var(--hms-sidebar-border);
  min-height: calc(100vh - var(--hms-topbar-height));
  transition: margin-left 0.2s ease-in-out;
}

.app-sidebar .nav-link {
  color: var(--bs-body-color);
  padding: 0.65rem 1.1rem;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.94rem;
}

.app-sidebar .nav-link i {
  font-size: 1.05rem;
  width: 1.2rem;
  text-align: center;
}

.app-sidebar .nav-link:hover {
  background-color: var(--bs-tertiary-bg);
}

.app-sidebar .nav-link.active {
  background-color: var(--hms-accent);
  color: #fff;
}

.app-content {
  min-width: 0;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    position: fixed;
    top: var(--hms-topbar-height);
    left: 0;
    bottom: 0;
    z-index: 1050;
    margin-left: calc(var(--hms-sidebar-width) * -1);
  }
  .app-sidebar.show {
    margin-left: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  }
}

/* ---------- Login page ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
  padding: 1rem;
}

.login-card {
  width: 100%;
  max-width: 400px;
  border: none;
  border-radius: 1rem;
}

/* ---------- Stat / KPI cards ---------- */
.stat-card {
  border: none;
  border-radius: 0.75rem;
  height: 100%;
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
}

/* ---------- Room status colors ---------- */
.badge-room-vacant { background-color: #198754; }
.badge-room-occupied { background-color: #0d6efd; }
.badge-room-dirty { background-color: #fd7e14; }
.badge-room-maintenance { background-color: #dc3545; }
.badge-room-out_of_order { background-color: #6c757d; }
.badge-room-vip_reserve { background-color: #6610f2; }

.room-card {
  border-radius: 0.75rem;
  border: 1px solid var(--hms-sidebar-border);
  cursor: pointer;
  transition: transform 0.1s ease-in-out;
}

.room-card:hover {
  transform: translateY(-2px);
}

.room-card.status-vacant { border-left: 5px solid #198754; }
.room-card.status-occupied { border-left: 5px solid #0d6efd; }
.room-card.status-dirty { border-left: 5px solid #fd7e14; }
.room-card.status-maintenance { border-left: 5px solid #dc3545; }
.room-card.status-out_of_order { border-left: 5px solid #6c757d; }
.room-card.status-vip_reserve { border-left: 5px solid #6610f2; }

.folio-item-row td {
  vertical-align: middle;
}
