/* ==========================================================================
   Hotel & Resort Management System - Admin Dashboard Styles (Phase 1)
   ========================================================================== */

:root {
  /* Colors - Light Theme */
  --body-bg: #f3f4f8;
  --card-bg: #ffffff;
  --card-border: #e6eaf0;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  /* Sidebar */
  --sidebar-bg: #141c2b;
  --sidebar-hover: rgba(255, 255, 255, 0.07);
  --sidebar-active-bg: rgba(37, 99, 235, 0.18);
  --sidebar-active-border: #3b82f6;
  --sidebar-text: #cbd5e1;
  --sidebar-text-active: #ffffff;
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 76px;
  --header-height: 68px;
  
  /* Accents */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --purple-accent: #6366f1;
  --purple-bg: #eef2ff;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --blue-accent: #3b82f6;
  --blue-bg: #eff6ff;
  
  /* Header */
  --header-bg: #ffffff;
  --header-border: #e6eaf0;
  
  /* Tables */
  --table-header-bg: #f8fafc;
  --table-border: #edf2f7;
  --table-hover: #f8fafc;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-card: 0 2px 8px -2px rgba(16, 24, 40, 0.06), 0 1px 3px 0 rgba(16, 24, 40, 0.04);
  --shadow-dropdown: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.06);
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-bs-theme="dark"] {
  --body-bg: #0b0f19;
  --card-bg: #131b2e;
  --card-border: #1e293b;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  
  /* Sidebar */
  --sidebar-bg: #0f172a;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active-bg: rgba(59, 130, 246, 0.22);
  --sidebar-active-border: #60a5fa;
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #ffffff;
  
  /* Accents in dark mode */
  --purple-bg: rgba(99, 102, 241, 0.14);
  --success-bg: rgba(16, 185, 129, 0.14);
  --warning-bg: rgba(245, 158, 11, 0.14);
  --danger-bg: rgba(239, 68, 68, 0.14);
  --blue-bg: rgba(59, 130, 246, 0.14);
  
  /* Header */
  --header-bg: #131b2e;
  --header-border: #1e293b;
  
  /* Tables */
  --table-header-bg: #192339;
  --table-border: #1e293b;
  --table-hover: #17223b;
  
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.28);
}

/* Base Body Styles */
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--body-bg);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
}

/* ==========================================================================
   Layout Structure
   ========================================================================== */

#app-wrapper,
.app-wrapper,
.app-layout,
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow-x: hidden;
}

/* ==========================================================================
   Sidebar Styles
   ========================================================================== */

.sidebar,
.sidebar-wrapper {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: width var(--transition), transform var(--transition);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

/* Sidebar Brand Header */
.sidebar-header,
.sidebar-brand-header {
  height: var(--header-height);
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.brand-icon-box,
.brand-logo-box,
.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
  flex-shrink: 0;
}

.sidebar-brand,
.brand-link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  text-decoration: none;
  color: inherit;
}

.brand-text,
.brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
}

.brand-title {
  color: #f8fafc;
  font-weight: 600;
  font-size: 0.925rem;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

/* Sidebar Navigation Menu */
.sidebar-menu-wrapper,
.sidebar-nav-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 0.75rem;
}

.sidebar-menu-wrapper::-webkit-scrollbar,
.sidebar-nav-container::-webkit-scrollbar {
  width: 4px;
}
.sidebar-menu-wrapper::-webkit-scrollbar-thumb,
.sidebar-nav-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.nav-item {
  list-style: none;
  margin-bottom: 0.25rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.sidebar-link-content {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.sidebar-icon {
  font-size: 1.15rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  flex-shrink: 0;
  transition: color var(--transition);
}

.sidebar-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--transition);
}

.sidebar-chevron {
  font-size: 0.75rem;
  color: #64748b;
  transition: transform 0.25s ease, color var(--transition);
}

.sidebar-link:hover {
  background-color: var(--sidebar-hover);
  color: #f8fafc;
}

.sidebar-link:hover .sidebar-icon,
.sidebar-link:hover .sidebar-chevron {
  color: #f8fafc;
}

/* Active Menu Item */
.sidebar-link.active {
  background-color: var(--sidebar-active-bg);
  color: var(--sidebar-text-active);
  font-weight: 600;
}

.sidebar-link.active .sidebar-icon {
  color: var(--sidebar-active-border);
}

.sidebar-link.active::before {
  content: "";
  position: absolute;
  left: -0.75rem;
  top: 15%;
  bottom: 15%;
  width: 4px;
  background-color: var(--sidebar-active-border);
  border-radius: 0 4px 4px 0;
}

/* Submenu Accordion */
.sidebar-submenu {
  list-style: none;
  padding: 0.25rem 0 0.25rem 2.45rem;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-submenu.show {
  max-height: 250px;
}

.sidebar-submenu .submenu-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.825rem;
  color: #94a3b8;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.sidebar-submenu .submenu-link:hover {
  color: #ffffff;
  background-color: var(--sidebar-hover);
}

.sidebar-submenu .submenu-link.active {
  color: #60a5fa;
  font-weight: 600;
}

.sidebar-link[aria-expanded="true"] .sidebar-chevron {
  transform: rotate(180deg);
}

/* Sidebar Footer (User Profile) */
.sidebar-footer {
  padding: 0.875rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.15);
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.4rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.sidebar-profile:hover {
  background: var(--sidebar-hover);
}

.profile-avatar-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.profile-details {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
  flex: 1;
}

.profile-name {
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-role {
  color: #94a3b8;
  font-size: 0.725rem;
  white-space: nowrap;
}

.profile-chevron {
  color: #64748b;
  font-size: 0.8rem;
}

/* ==========================================================================
   Collapsed Sidebar (Tablet / Desktop toggle)
   ========================================================================== */

body.sidebar-collapsed .sidebar,
body.sidebar-collapsed .sidebar-wrapper {
  width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .sidebar .brand-text,
body.sidebar-collapsed .sidebar .sidebar-label,
body.sidebar-collapsed .sidebar .sidebar-chevron,
body.sidebar-collapsed .sidebar .sidebar-submenu,
body.sidebar-collapsed .sidebar .profile-details,
body.sidebar-collapsed .sidebar .profile-chevron,
body.sidebar-collapsed .sidebar-wrapper .brand-text,
body.sidebar-collapsed .sidebar-wrapper .sidebar-label,
body.sidebar-collapsed .sidebar-wrapper .sidebar-chevron,
body.sidebar-collapsed .sidebar-wrapper .sidebar-submenu,
body.sidebar-collapsed .sidebar-wrapper .profile-details,
body.sidebar-collapsed .sidebar-wrapper .profile-chevron {
  display: none !important;
}

body.sidebar-collapsed .sidebar .sidebar-header,
body.sidebar-collapsed .sidebar-wrapper .sidebar-header,
body.sidebar-collapsed .sidebar .sidebar-brand-header,
body.sidebar-collapsed .sidebar-wrapper .sidebar-brand-header {
  justify-content: center;
  padding: 0;
}

body.sidebar-collapsed .sidebar .sidebar-link,
body.sidebar-collapsed .sidebar-wrapper .sidebar-link {
  justify-content: center;
  padding: 0.75rem;
}

body.sidebar-collapsed .sidebar .sidebar-link-content,
body.sidebar-collapsed .sidebar-wrapper .sidebar-link-content {
  gap: 0;
  justify-content: center;
}

body.sidebar-collapsed .sidebar .sidebar-link.active::before,
body.sidebar-collapsed .sidebar-wrapper .sidebar-link.active::before {
  left: 0;
}

body.sidebar-collapsed .sidebar .sidebar-footer,
body.sidebar-collapsed .sidebar-wrapper .sidebar-footer {
  padding: 0.75rem 0.5rem;
  display: flex;
  justify-content: center;
}

body.sidebar-collapsed .main-content-wrapper,
body.sidebar-collapsed .main-wrapper {
  margin-left: var(--sidebar-collapsed-width);
}

/* Mobile Sidebar Backdrop Overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  z-index: 1035;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   Main Content Area & Top Header
   ========================================================================== */

.main-content-wrapper,
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  transition: margin-left var(--transition);
}

/* Top Navigation Header */
.top-header,
.top-navbar {
  height: var(--header-height);
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  position: sticky;
  top: 0;
  z-index: 1020;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color var(--transition), border-color var(--transition);
}

.header-left,
.top-navbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Header Action Buttons */
.btn-icon-header,
.navbar-toggle-btn,
.nav-icon-btn,
.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--card-border);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  font-size: 1.1rem;
  padding: 0;
}

.btn-icon-header:hover,
.navbar-toggle-btn:hover,
.nav-icon-btn:hover,
.theme-toggle-btn:hover {
  color: var(--text-main);
  background-color: var(--table-header-bg);
  border-color: var(--text-light);
}

/* Breadcrumbs */
.header-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb-home {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.breadcrumb-home:hover {
  color: var(--primary);
}

.breadcrumb-separator {
  font-size: 0.75rem;
  color: var(--text-light);
}

.breadcrumb-current {
  color: var(--text-main);
  font-weight: 500;
}

/* Header Right Actions */
.header-right,
.top-navbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Search Box in Header */
.header-search-wrapper,
.navbar-search {
  position: relative;
  width: 240px;
  transition: width var(--transition);
}

.header-search-wrapper:focus-within,
.navbar-search:focus-within {
  width: 290px;
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon-left,
.navbar-search .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.header-search-input,
.navbar-search .search-input {
  width: 100%;
  height: 40px;
  padding: 0 2.2rem 0 2.3rem;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background-color: var(--body-bg);
  color: var(--text-main);
  font-size: 0.875rem;
  outline: none;
  transition: var(--transition);
}

.header-search-input:focus,
.navbar-search .search-input:focus {
  border-color: var(--primary);
  background-color: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.top-nav-divider {
  width: 1px;
  height: 24px;
  background-color: var(--card-border);
  margin: 0 0.25rem;
}

.property-pill-badge {
  background-color: var(--body-bg);
  border: 1px solid var(--card-border);
  padding: 0.35rem 0.75rem;
  border-radius: 50rem;
  color: var(--text-main);
  font-size: 0.825rem;
  white-space: nowrap;
}

.search-clear-btn {
  position: absolute;
  right: 0.65rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 4px;
  display: none;
  font-size: 0.85rem;
  align-items: center;
  justify-content: center;
}

.search-clear-btn:hover {
  color: var(--danger);
}

/* Live Search Suggestions Dropdown */
.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.5rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dropdown);
  padding: 0.5rem 0;
  z-index: 1050;
  display: none;
  max-height: 320px;
  overflow-y: auto;
}

.search-results-dropdown.show {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.85rem;
  transition: background-color var(--transition);
  cursor: pointer;
}

.search-result-item:hover {
  background-color: var(--table-header-bg);
}

.search-result-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: var(--purple-bg);
  color: var(--purple-accent);
  font-weight: 600;
  text-transform: uppercase;
}

/* Notification Badge */
.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background-color: var(--danger);
  color: #ffffff;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--header-bg);
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
}

/* Notification Dropdown Menu */
.notifications-menu {
  width: 340px;
  padding: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-dropdown);
  background-color: var(--card-bg);
}

.notification-header {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notification-header h6 {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
}

.notification-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 0;
  margin: 0;
  list-style: none;
}

.notification-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--card-border);
  transition: background-color var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.notification-item:hover {
  background-color: var(--table-header-bg);
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.notification-body {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.15rem;
}

.notification-desc {
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-time {
  font-size: 0.7rem;
  color: var(--text-light);
}

.notification-footer {
  padding: 0.65rem 1rem;
  text-align: center;
  border-top: 1px solid var(--card-border);
}

.notification-footer a {
  font-size: 0.825rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

/* User Profile Header Dropdown */
.profile-btn-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
}

.profile-btn-header:hover {
  background-color: var(--table-header-bg);
}

.profile-btn-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* ==========================================================================
   Dashboard Main Content
   ========================================================================== */

.content-body {
  padding: 1.75rem;
  flex: 1;
}

.dashboard-title-area {
  margin-bottom: 1.75rem;
}

.dashboard-main-heading {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.dashboard-subheading {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

/* ==========================================================================
   Statistics Cards
   ========================================================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  padding: 1.5rem 1.25rem 1.25rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px -4px rgba(16, 24, 40, 0.1);
}

/* Top Accent Bars */
.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.stat-card-rooms::before {
  background-color: var(--purple-accent);
}

.stat-card-bookings::before {
  background-color: var(--success);
}

.stat-card-guests::before {
  background-color: var(--warning);
}

.stat-card-revenue::before {
  background-color: var(--blue-accent);
}

/* Stat Card Content Layout */
.stat-card-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.stat-icon-wrapper {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.stat-card:hover .stat-icon-wrapper {
  transform: scale(1.05);
}

.stat-icon-rooms {
  background-color: var(--purple-bg);
  color: var(--purple-accent);
}

.stat-icon-bookings {
  background-color: var(--success-bg);
  color: var(--success);
}

.stat-icon-guests {
  background-color: var(--warning-bg);
  color: var(--warning);
}

.stat-icon-revenue {
  background-color: var(--blue-bg);
  color: var(--blue-accent);
}

.stat-data {
  flex: 1;
  min-width: 0;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.trend-up {
  color: var(--success);
}

/* ==========================================================================
   Dashboard Split Section (Bookings & Room Status)
   ========================================================================== */

.dashboard-split-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.dash-card {
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.dash-card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.01em;
}

.view-all-link {
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap var(--transition), color var(--transition);
}

.view-all-link:hover {
  color: var(--primary-hover);
  gap: 0.45rem;
}

.dash-card-body {
  padding: 1.25rem 1.5rem;
  flex: 1;
}

/* ==========================================================================
   Recent Bookings Table
   ========================================================================== */

.table-responsive {
  margin: 0;
}

.custom-table {
  width: 100%;
  margin-bottom: 0;
  color: var(--text-main);
  vertical-align: middle;
  border-collapse: separate;
  border-spacing: 0;
}

.custom-table thead th {
  background-color: var(--table-header-bg);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.85rem 1rem;
  border-top: none;
  border-bottom: 1px solid var(--table-border);
  white-space: nowrap;
}

.custom-table thead th:first-child {
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
}

.custom-table thead th:last-child {
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.custom-table tbody tr {
  transition: background-color var(--transition);
}

.custom-table tbody tr:hover {
  background-color: var(--table-hover);
}

.custom-table tbody td {
  padding: 1rem 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--table-border);
  white-space: nowrap;
}

.custom-table tbody tr:last-child td {
  border-bottom: none;
}

.booking-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 600;
  color: var(--primary);
}

.guest-name {
  font-weight: 600;
  color: var(--text-main);
}

.room-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  font-weight: 500;
}

.booking-date {
  color: var(--text-muted);
  font-size: 0.825rem;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 50rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.badge-confirmed {
  background-color: var(--success);
  color: #ffffff;
}

.badge-checked-in {
  background-color: var(--primary);
  color: #ffffff;
}

.badge-pending {
  background-color: var(--warning);
  color: #ffffff;
}

.badge-checked-out {
  background-color: #64748b;
  color: #ffffff;
}

/* ==========================================================================
   Room Status Card
   ========================================================================== */

.room-status-list {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.room-status-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.status-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-label-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.dot-available {
  background-color: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.status-dot.dot-occupied {
  background-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.status-dot.dot-reserved {
  background-color: var(--warning);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.status-dot.dot-maintenance {
  background-color: #64748b;
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.2);
}

.status-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
}

.status-count {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.custom-progress {
  height: 8px;
  background-color: var(--table-border);
  border-radius: 50rem;
  overflow: hidden;
}

.custom-progress-bar {
  height: 100%;
  border-radius: 50rem;
  transition: width 0.6s ease;
}

.bar-available {
  background-color: var(--success);
}

.bar-occupied {
  background-color: var(--danger);
}

.bar-reserved {
  background-color: var(--warning);
}

.bar-maintenance {
  background-color: #64748b;
}

/* Room Occupancy Segmented Bar Summary */
.room-summary-box {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: var(--table-header-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
}

.occupancy-rate-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.occupancy-percentage {
  font-weight: 700;
  color: var(--text-main);
}

.segmented-progress {
  display: flex;
  height: 10px;
  border-radius: 50rem;
  overflow: hidden;
  gap: 2px;
  background-color: var(--card-border);
}

/* ==========================================================================
   Toast Notification & Demo Feedback
   ========================================================================== */

.demo-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1100;
  background: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dropdown);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
  pointer-events: none;
}

.demo-toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .dashboard-split-section {
    grid-template-columns: 1fr;
  }
  
  .header-search-wrapper {
    width: 180px;
  }
  
  .header-search-wrapper:focus-within {
    width: 220px;
  }
}

@media (max-width: 768px) {
  .sidebar,
  .sidebar-wrapper {
    transform: translateX(-100%);
    width: var(--sidebar-width) !important;
  }
  
  .sidebar.mobile-open,
  .sidebar-wrapper.mobile-open {
    transform: translateX(0);
  }
  
  .main-content-wrapper,
  .main-wrapper {
    margin-left: 0 !important;
  }
  
  .top-header,
  .top-navbar {
    padding: 0 1rem;
  }
  
  .content-body {
    padding: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .header-search-wrapper,
  .navbar-search {
    display: none;
  }
  
  .header-breadcrumb {
    font-size: 0.8rem;
  }
  
  .notifications-menu {
    width: 300px;
    right: -70px !important;
  }
}

@media (max-width: 480px) {
  .top-header {
    gap: 0.5rem;
  }
  
  .btn-icon-header {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  
  .header-left {
    gap: 0.5rem;
  }
  
  .dashboard-main-heading {
    font-size: 1.45rem;
  }
}

/* ==========================================================================
   Phase 2: Administration & Hotel Structure Shared Styles
   ========================================================================== */

/* Page Header & Top Action Area */
.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.page-title-group {
  flex: 1;
  min-width: 240px;
}

.page-main-heading {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.page-subheading {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.page-actions-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-primary-custom {
  background-color: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.15);
}

.btn-primary-custom:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.btn-outline-custom {
  background-color: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}

.btn-outline-custom:hover {
  background-color: var(--table-header-bg);
  color: var(--primary);
  border-color: var(--primary);
}

/* Summary Cards Grid */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.summary-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.summary-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -2px rgba(16, 24, 40, 0.08);
}

.summary-icon-box {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.summary-card-info {
  flex: 1;
  min-width: 0;
}

.summary-card-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.summary-card-value {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

/* Filter Card / Bar */
.filter-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.filter-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.filter-search-input {
  width: 100%;
  height: 38px;
  padding: 0 2rem 0 2.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background-color: var(--body-bg);
  color: var(--text-main);
  font-size: 0.875rem;
  outline: none;
  transition: var(--transition);
}

.filter-search-input:focus {
  border-color: var(--primary);
  background-color: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.filter-select {
  height: 38px;
  padding: 0 2rem 0 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background-color: var(--body-bg);
  color: var(--text-main);
  font-size: 0.875rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
  min-width: 140px;
}

.filter-select:focus {
  border-color: var(--primary);
  background-color: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.btn-filter-reset {
  height: 38px;
  padding: 0 0.9rem;
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.825rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-filter-reset:hover {
  color: var(--danger);
  border-color: var(--danger);
  background-color: var(--danger-bg);
}

/* User Profile in Table */
.table-user-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.user-name-title {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.875rem;
  margin-bottom: 0.1rem;
}

.user-meta-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Badge Variants */
.badge-role {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--purple-bg);
  color: var(--purple-accent);
}

.badge-role-admin {
  background-color: rgba(99, 102, 241, 0.15);
  color: #6366f1;
}

.badge-role-manager {
  background-color: rgba(37, 99, 235, 0.15);
  color: #2563eb;
}

.badge-role-reception {
  background-color: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.badge-role-housekeeping {
  background-color: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.badge-role-accountant {
  background-color: rgba(14, 165, 233, 0.15);
  color: #0284c7;
}

.badge-status-active {
  background-color: var(--success);
  color: #ffffff;
}

.badge-status-inactive {
  background-color: #94a3b8;
  color: #ffffff;
}

/* Activity Log Badges */
.badge-action-created {
  background-color: var(--success);
  color: #ffffff;
}

.badge-action-updated {
  background-color: var(--primary);
  color: #ffffff;
}

.badge-action-deleted {
  background-color: var(--danger);
  color: #ffffff;
}

.badge-action-login {
  background-color: #6366f1;
  color: #ffffff;
}

.badge-action-logout {
  background-color: #64748b;
  color: #ffffff;
}

.badge-module {
  background-color: var(--table-header-bg);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
}

.ip-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.775rem;
  color: var(--text-muted);
  background: var(--table-header-bg);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--table-border);
}

/* Table Action Buttons */
.action-btn-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-table-action {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-table-action:hover {
  background: var(--table-header-bg);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-table-action.btn-delete:hover {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger);
}

/* Pagination Styling */
.table-pagination-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--card-border);
  flex-wrap: wrap;
  gap: 1rem;
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.custom-pagination {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.35rem;
}

.custom-pagination .page-item .page-link {
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-main);
  font-size: 0.825rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-pagination .page-item.active .page-link {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  font-weight: 600;
}

.custom-pagination .page-item .page-link:hover:not(.disabled) {
  background-color: var(--table-header-bg);
  color: var(--primary);
  border-color: var(--primary);
}

/* Properties Grid & Card Styles */
.property-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.property-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}

.property-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -4px rgba(16, 24, 40, 0.12);
}

.property-banner-box {
  position: relative;
  height: 160px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.property-banner-box.hotel-palace {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e1b4b 100%);
}

.property-banner-box.resort-beach {
  background: linear-gradient(135deg, #065f46 0%, #022c22 100%);
}

.property-banner-box.hotel-city {
  background: linear-gradient(135deg, #431407 0%, #1c1917 100%);
}

.property-watermark-icon {
  font-size: 5.5rem;
  color: rgba(255, 255, 255, 0.12);
  position: absolute;
  right: -10px;
  bottom: -15px;
}

.property-banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 1rem;
}

.property-badge-status {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 3;
}

.property-card-body {
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.property-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.property-location {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.15rem;
}

.property-metrics-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  padding: 0.85rem;
  background-color: var(--table-header-bg);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  border: 1px solid var(--table-border);
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.metric-item .metric-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.metric-item .metric-title {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.property-contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem 0;
  font-size: 0.825rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.property-contact-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.property-card-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
}

/* Facilities Grid & Category Pills */
.facility-filter-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.facility-pill {
  padding: 0.45rem 0.95rem;
  border-radius: 50rem;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-main);
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.facility-pill:hover,
.facility-pill.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.facilities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.facility-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}

.facility-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -2px rgba(16, 24, 40, 0.08);
}

.facility-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.facility-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.facility-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.facility-category-badge {
  display: inline-block;
  font-size: 0.725rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--table-header-bg);
  color: var(--text-muted);
  border: 1px solid var(--table-border);
  margin-bottom: 0.65rem;
}

.facility-desc {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex: 1;
  line-height: 1.5;
}

.facility-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--card-border);
  padding-top: 0.85rem;
  margin-top: auto;
}

/* Permission Matrix UI in Role Modal & View */
.permission-groups-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.permission-group-card {
  background-color: var(--table-header-bg);
  border: 1px solid var(--table-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.permission-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--card-border);
}

.permission-group-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.permission-items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.permission-switch-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.825rem;
  color: var(--text-main);
}

/* Modal Dark Mode Overrides & Aesthetics */
.modal-content {
  background-color: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-dropdown);
}

.modal-header {
  border-bottom: 1px solid var(--card-border);
  padding: 1.15rem 1.5rem;
}

.modal-title {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-main);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--card-border);
  padding: 1rem 1.5rem;
}

.form-label-custom {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.form-control-custom,
.form-select-custom {
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background-color: var(--body-bg);
  color: var(--text-main);
  font-size: 0.875rem;
  padding: 0.45rem 0.85rem;
  outline: none;
  transition: var(--transition);
  width: 100%;
}

.form-control-custom:focus,
.form-select-custom:focus {
  border-color: var(--primary);
  background-color: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  color: var(--text-main);
}

textarea.form-control-custom {
  height: auto;
  min-height: 80px;
}

[data-bs-theme="dark"] .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* Responsive Overrides for Phase 2 */
@media (max-width: 1200px) {
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .property-grid,
  .facilities-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .summary-grid,
  .summary-grid-3 {
    grid-template-columns: 1fr;
  }
  
  .property-grid,
  .facilities-grid {
    grid-template-columns: 1fr;
  }
  
  .permission-items-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-select,
  .btn-filter-reset {
    width: 100%;
  }
}

/* ==========================================================================
   Phase 3: Master Data & Custom Fields Styles
   ========================================================================== */

/* Badges for Guest Types & Field Attributes */
.badge-vip {
  background-color: rgba(147, 51, 234, 0.12);
  color: #9333ea;
  border: 1px solid rgba(147, 51, 234, 0.2);
}
[data-bs-theme="dark"] .badge-vip {
  background-color: rgba(168, 85, 247, 0.2);
  color: #c084fc;
}

.badge-corporate {
  background-color: rgba(14, 165, 233, 0.12);
  color: #0284c7;
  border: 1px solid rgba(14, 165, 233, 0.2);
}
[data-bs-theme="dark"] .badge-corporate {
  background-color: rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
}

.badge-regular {
  background-color: rgba(100, 116, 139, 0.12);
  color: #475569;
  border: 1px solid rgba(100, 116, 139, 0.2);
}
[data-bs-theme="dark"] .badge-regular {
  background-color: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
}

.badge-required {
  background-color: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
[data-bs-theme="dark"] .badge-required {
  background-color: rgba(239, 68, 68, 0.22);
  color: #f87171;
}

.badge-optional {
  background-color: rgba(100, 116, 139, 0.12);
  color: #64748b;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
}
[data-bs-theme="dark"] .badge-optional {
  background-color: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

/* Booking Sources Distribution Visualizer */
.source-distribution-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.5rem;
}

.dist-header-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.dist-bars-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dist-bar-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dist-bar-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.dist-bar-label {
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.dist-bar-val {
  font-weight: 700;
  color: var(--text-muted);
}

.dist-bar-track {
  height: 10px;
  background-color: var(--table-header-bg);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.dist-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Table conversion progress bar */
.table-conv-wrapper {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 120px;
}

.table-conv-track {
  flex-grow: 1;
  height: 6px;
  background-color: var(--card-border);
  border-radius: 9999px;
  overflow: hidden;
}

.table-conv-fill {
  height: 100%;
  border-radius: 9999px;
}

.table-conv-percent {
  font-weight: 600;
  font-size: 0.825rem;
  color: var(--text-main);
  min-width: 32px;
}

/* Room Amenities Filter Pills & Cards Grid */
.amenity-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.amenity-filter-pill {
  border: 1px solid var(--card-border);
  background-color: var(--card-bg);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition);
  text-decoration: none;
}

.amenity-filter-pill:hover {
  background-color: var(--table-hover);
  color: var(--primary);
  border-color: var(--primary);
}

.amenity-filter-pill.active {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.28);
}

.amenity-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1400px) {
  .amenity-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .amenity-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .amenity-grid {
    grid-template-columns: 1fr;
  }
}

.amenity-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.amenity-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -2px rgba(16, 24, 40, 0.1);
  border-color: rgba(37, 99, 235, 0.35);
}

.amenity-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}

.amenity-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.amenity-title-wrap {
  flex-grow: 1;
  min-width: 0;
}

.amenity-title {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.amenity-category-badge {
  font-size: 0.725rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background-color: var(--table-header-bg);
  color: var(--text-muted);
  border: 1px solid var(--card-border);
  display: inline-block;
}

.amenity-desc {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.amenity-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--card-border);
  margin-top: auto;
}

/* Guest Details Modal Presentation */
.guest-profile-banner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  background-color: var(--table-header-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.guest-avatar-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: var(--shadow-sm);
}
[data-bs-theme="dark"] .guest-avatar-large {
  border-color: var(--card-border);
}

.guest-profile-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.guest-profile-meta {
  font-size: 0.825rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.guest-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 576px) {
  .guest-details-grid {
    grid-template-columns: 1fr;
  }
}

.guest-detail-box {
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background-color: var(--body-bg);
  border: 1px solid var(--card-border);
}

.guest-detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.2rem;
}

.guest-detail-val {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Custom Field Dynamic Preview Box */
.field-preview-container {
  background-color: var(--body-bg);
  border: 1px dashed var(--primary);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
}

.field-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.field-preview-title {
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.field-preview-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background-color: rgba(37, 99, 235, 0.12);
  color: var(--primary);
}

.preview-rendered-control {
  background-color: var(--card-bg);
  padding: 1rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
}

/* Pagination container styling */
.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.25rem;
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  gap: 0.35rem;
}

.page-btn {
  height: 36px;
  min-width: 36px;
  padding: 0 0.65rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background-color: var(--card-bg);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.page-btn:hover:not(.disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--table-hover);
}

.page-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.page-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==========================================================================
   PHASE 4: Rooms & Room Types Styles
   ========================================================================== */

/* View Mode Toggle (Table / Grid) */
.view-mode-toggle {
  display: inline-flex;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 3px;
}

.view-mode-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: calc(var(--radius-md) - 3px);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: var(--transition);
}

.view-mode-btn:hover {
  color: var(--primary);
}

.view-mode-btn.active {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

/* Room Status Overview Visual */
.room-status-overview-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-card);
}

.room-progress-item {
  margin-bottom: 0.95rem;
}

.room-progress-item:last-child {
  margin-bottom: 0;
}

.room-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
  font-size: 0.825rem;
}

.room-progress-label {
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.room-progress-count {
  font-weight: 700;
  color: var(--text-muted);
  font-family: monospace;
}

.room-progress-bar-container {
  height: 8px;
  border-radius: 999px;
  background-color: var(--table-header-bg);
  overflow: hidden;
  border: 1px solid var(--card-border);
}

.room-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s ease-in-out;
}

/* Room Grid View Cards */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.room-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.room-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px -4px rgba(16, 24, 40, 0.1);
  border-color: rgba(37, 99, 235, 0.35);
}

.room-card-header {
  padding: 1.15rem 1.25rem 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px dashed var(--card-border);
}

.room-number-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.room-number-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.room-number-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  line-height: 1.2;
}

.room-type-sub {
  font-size: 0.775rem;
  color: var(--text-muted);
  font-weight: 500;
}

.room-card-body {
  padding: 1rem 1.25rem;
  flex-grow: 1;
}

.room-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.room-card-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.room-card-meta-item i {
  color: var(--text-light);
  font-size: 0.95rem;
  width: 16px;
}

.room-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.room-card-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: auto;
}

.room-card-price span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.room-card-footer {
  padding: 0.85rem 1.25rem;
  background-color: var(--table-header-bg);
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Room Types Grid */
.room-types-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 1199px) {
  .room-types-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .room-types-grid {
    grid-template-columns: 1fr;
  }
}

.room-type-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.room-type-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(16, 24, 40, 0.1);
  border-color: rgba(99, 102, 241, 0.4);
}

.room-type-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.room-type-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.room-type-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
  min-height: 40px;
}

.room-type-spec-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  padding: 1rem;
  background-color: var(--table-header-bg);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  border: 1px solid var(--card-border);
}

.room-type-spec-item {
  display: flex;
  flex-direction: column;
}

.room-type-spec-label {
  font-size: 0.725rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.room-type-spec-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.room-type-card-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.room-type-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
}

.room-type-price span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Pricing Breakdown in Room Type Modal */
.pricing-breakdown-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

@media (max-width: 575px) {
  .pricing-breakdown-box {
    grid-template-columns: 1fr;
  }
}

.pricing-rate-card {
  background-color: var(--table-header-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}

.pricing-rate-title {
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.pricing-rate-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
}

/* Amenities Checkboxes Grid */
.amenities-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  max-height: 240px;
  overflow-y: auto;
  padding: 0.75rem;
  background-color: var(--table-header-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
}

/* Modal detail specs list */
.detail-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 575px) {
  .detail-spec-grid {
    grid-template-columns: 1fr;
  }
}

.detail-spec-box {
  background-color: var(--table-header-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
}

.detail-spec-box .label {
  font-size: 0.725rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.detail-spec-box .val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}
