/* ============================================================
   The Unique Haven Homes CRM — HomeyIndia Design System
   Professional Enterprise CRM Theme & Layout Overhaul
   ============================================================ */

/* --- 1. Custom CSS Variables (HomeyIndia CRM Design Tokens) --- */
:root {
  --crm-primary: #0EA5E9;
  --crm-primary-dark: #0284C7;
  --crm-primary-light: #38BDF8;
  --crm-primary-lighter: #BAE6FD;
  --crm-primary-bg: #F0F9FF;
  --crm-secondary: #0F172A;
  
  --crm-sidebar-bg: #FFFFFF;
  --crm-sidebar-hover: #F1F5F9;
  --crm-sidebar-border: #E2E8F0;
  --crm-sidebar-text: #475569;
  --crm-sidebar-text-active: #0284C7;
  
  --crm-bg-page: #F1F5F9;
  --crm-bg-card: #FFFFFF;
  --crm-bg-input: #FFFFFF;
  --crm-bg-hover: #F8FAFC;
  
  --crm-text-heading: #0F172A;
  --crm-text-primary: #1E293B;
  --crm-text-secondary: #64748B;
  --crm-text-muted: #94A3B8;
  
  --crm-border: #E2E8F0;
  --crm-border-strong: #CBD5E1;
  --crm-radius-sm: 6px;
  --crm-radius: 10px;
  --crm-radius-lg: 14px;
  
  --crm-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --crm-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08);
  --crm-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --crm-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

/* Base Font & Canvas */
body {
  font-family: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
  background-color: var(--crm-bg-page) !important;
  color: var(--crm-text-primary) !important;
  -webkit-font-smoothing: antialiased;
}

/* 🧼 Clean modern number inputs without browser spinner arrows & accidental wheel jumps */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* --- 2. Master App Layout --- */
.app-container {
  display: flex !important;
  flex-direction: row !important;
  min-height: 100vh !important;
  background: var(--crm-bg-page) !important;
  position: relative !important;
}

/* --- 3. Restored Desktop Sidebar --- */
@media (min-width: 1200px) {
  .sidebar {
    display: flex !important;
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    background-color: #FFFFFF !important;
    color: #1E293B !important;
    border-right: 1px solid var(--crm-border) !important;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04) !important;
    z-index: 100 !important;
    transform: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .sidebar::-webkit-scrollbar {
    width: 4px;
  }
  .sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
  }

  .sidebar-close-btn {
    display: none !important;
  }

  .app-main-wrapper {
    margin-left: 260px !important;
    width: calc(100% - 260px) !important;
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    background: var(--crm-bg-page) !important;
  }

  .topbar-desktop-nav {
    display: none !important;
  }

  /* 🚫 Eliminate duplicate logo in topbar on desktop (sidebar already has brand logo) */
  .topbar-left .topbar-brand-group {
    display: none !important;
  }
  .topbar-left .sidebar-toggle-btn {
    display: none !important;
  }
  .topbar-search-menu-btn {
    min-width: 260px !important;
    max-width: 380px !important;
    width: 100% !important;
  }
}

/* Mobile & Tablet Sidebar Drawer */
@media (max-width: 1199px) {
  .sidebar {
    width: 280px !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    background: var(--crm-sidebar-bg) !important;
    z-index: 99999 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    overflow-y: auto !important;
  }
  .sidebar.mobile-drawer-open {
    transform: translateX(0) !important;
  }
  .app-main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
  }
}

/* --- 4. Sidebar Elements Styling (Matching Clean Light Design) --- */
.sidebar-top {
  padding: 1.15rem 1.25rem !important;
  border-bottom: 1px solid var(--crm-border) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.sidebar-brand {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  text-decoration: none !important;
  color: #0F172A !important;
}

.brand-logo-wrap {
  width: 38px !important;
  height: 38px !important;
  border-radius: 8px !important;
  background: var(--crm-primary) !important;
  border: none !important;
  box-shadow: 0 4px 10px rgba(14, 165, 233, 0.25) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.brand-logo-wrap img {
  width: 24px !important;
  height: 24px !important;
  object-fit: contain !important;
}

.brand-text .brand-name {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #0F172A !important;
  letter-spacing: -0.01em !important;
  display: block !important;
  line-height: 1.2 !important;
}

.brand-text .brand-sub {
  font-size: 0.7rem !important;
  color: #64748B !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  display: block !important;
}

/* User Card in Sidebar */
.sidebar-user-card {
  padding: 0.75rem 1rem !important;
  margin: 0.75rem 0.85rem !important;
  background: #F8FAFC !important;
  border: 1px solid var(--crm-border) !important;
  border-radius: var(--crm-radius) !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
}

.sidebar-user-card .user-avatar {
  width: 36px !important;
  height: 36px !important;
  border-radius: 8px !important;
  background: #E0F2FE !important;
  color: #0284C7 !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
}

.sidebar-user-card .user-info .user-name {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: #0F172A !important;
  display: block !important;
}

.sidebar-user-card .user-info .user-role-badge {
  font-size: 0.72rem !important;
  color: #64748B !important;
  font-weight: 500 !important;
}

/* Sidebar Search */
.drawer-search {
  padding: 0 0.85rem 0.6rem !important;
}

.drawer-search input {
  width: 100% !important;
  background: #F8FAFC !important;
  border: 1px solid var(--crm-border) !important;
  color: #0F172A !important;
  padding: 0.55rem 0.85rem !important;
  border-radius: 8px !important;
  font-size: 0.8125rem !important;
  box-sizing: border-box !important;
}

.drawer-search input:focus {
  outline: none !important;
  border-color: var(--crm-primary) !important;
  background: #FFFFFF !important;
}

/* Sidebar Navigation Items */
.sidebar-nav {
  padding: 0.5rem 0.75rem !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.25rem !important;
}

.nav-section-heading {
  font-size: 0.6875rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: #94A3B8 !important;
  padding: 0.85rem 0.75rem 0.35rem !important;
}

.sidebar-nav a {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  padding: 0.625rem 0.85rem !important;
  color: #475569 !important;
  text-decoration: none !important;
  border-radius: var(--crm-radius-sm) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  transition: all 0.15s ease !important;
}

.sidebar-nav a i.nav-icon {
  font-size: 1.15rem !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
  color: #64748B !important;
  transition: color 0.15s ease !important;
}

.sidebar-nav a:hover {
  background: #F1F5F9 !important;
  color: var(--crm-primary-dark) !important;
}

.sidebar-nav a:hover i.nav-icon {
  color: var(--crm-primary) !important;
}

.sidebar-nav a.active,
.sidebar-nav a.active-hub {
  background: #E0F2FE !important;
  color: #0284C7 !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.sidebar-nav a.active i.nav-icon,
.sidebar-nav a.active-hub i.nav-icon {
  color: #0284C7 !important;
}

/* Sidebar Footer */
.sidebar-footer {
  margin-top: auto !important;
  padding: 0.85rem !important;
  border-top: 1px solid var(--crm-border) !important;
  display: flex !important;
  gap: 0.5rem !important;
  background: #FFFFFF !important;
}

.sidebar-action-btn {
  flex: 1 !important;
  padding: 0.55rem !important;
  border-radius: 6px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  border: 1px solid var(--crm-border) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.4rem !important;
  transition: all 0.15s ease !important;
}

.sidebar-action-btn.pref-btn {
  background: #F8FAFC !important;
  color: #475569 !important;
}
.sidebar-action-btn.pref-btn:hover {
  background: #F1F5F9 !important;
  color: #0F172A !important;
}

.sidebar-action-btn.logout-btn {
  background: #F8FAFC !important;
  color: #64748B !important;
}
.sidebar-action-btn.logout-btn:hover {
  background: #F1F5F9 !important;
  color: #0F172A !important;
  border-color: #CBD5E1 !important;
}

/* --- 5. Executive Topbar Styling --- */
.app-topbar {
  height: 64px !important;
  background: #FFFFFF !important;
  border-bottom: 1px solid var(--crm-border) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 1.5rem !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 90 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

.topbar-left {
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
}

.topbar-page-breadcrumb {
  display: flex !important;
  flex-direction: column !important;
}

.topbar-page-breadcrumb .topbar-page-title {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: var(--crm-text-heading) !important;
  line-height: 1.2 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.topbar-page-breadcrumb .topbar-page-sub {
  font-size: 0.75rem !important;
  color: var(--crm-text-secondary) !important;
  margin-top: 2px !important;
}

.topbar-right {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
}

/* Search Command Palette Button */
.topbar-search-menu-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  background: #F8FAFC !important;
  border: 1px solid var(--crm-border) !important;
  border-radius: 8px !important;
  padding: 0.45rem 0.85rem !important;
  color: var(--crm-text-secondary) !important;
  font-size: 0.8125rem !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.topbar-search-menu-btn:hover {
  background: #F1F5F9 !important;
  border-color: var(--crm-border-strong) !important;
  color: var(--crm-text-heading) !important;
}

.search-btn-kbd {
  background: #E2E8F0 !important;
  color: #475569 !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  padding: 2px 5px !important;
  border-radius: 4px !important;
}

/* Property Selector Dropdown */
.topbar-property-selector {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  background: #FFFFFF !important;
  border: 1px solid var(--crm-border) !important;
  border-radius: 8px !important;
  padding: 0.35rem 0.65rem !important;
  transition: border-color 0.15s ease !important;
}

.topbar-property-selector:focus-within {
  border-color: var(--crm-primary) !important;
}

.topbar-property-selector select {
  border: none !important;
  background: transparent !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  color: var(--crm-text-primary) !important;
  cursor: pointer !important;
  outline: none !important;
}

/* Primary + New Booking Button */
.topbar-new-booking-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  background: var(--crm-primary) !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.35) !important;
  transition: all 0.15s ease !important;
}

.topbar-new-booking-btn:hover {
  background: var(--crm-primary-dark) !important;
  transform: translateY(-1px) !important;
}

/* User Avatar Pill */
.topbar-avatar-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.35rem 0.65rem !important;
  background: #F8FAFC !important;
  border: 1px solid var(--crm-border) !important;
  border-radius: 9999px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.topbar-avatar-pill:hover {
  background: #F1F5F9 !important;
  border-color: var(--crm-border-strong) !important;
}

.user-avatar-mini {
  width: 26px !important;
  height: 26px !important;
  border-radius: 9999px !important;
  background: var(--crm-primary) !important;
  color: #FFFFFF !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.user-name-mini {
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  color: var(--crm-text-primary) !important;
}

/* --- 5. Notifications Bell & Floating Pill Badge --- */
#topbarNotifBtn,
.topbar-icon-btn {
  position: relative !important;
  overflow: visible !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.notif-bell-badge {
  position: absolute !important;
  top: -4px !important;
  right: -4px !important;
  min-width: 17px !important;
  height: 17px !important;
  padding: 0 4px !important;
  border-radius: 999px !important;
  background: #EF4444 !important;
  color: #FFFFFF !important;
  font-size: 9.5px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  align-items: center !important;
  justify-content: center !important;
  border: 2px solid #FFFFFF !important;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.45) !important;
  z-index: 10 !important;
  pointer-events: none !important;
  box-sizing: border-box !important;
}

/* --- 6. Hub Sub-navigation Strip --- */
.hub-subnav-strip {
  background: #FFFFFF !important;
  border: 1px solid var(--crm-border) !important;
  border-radius: var(--crm-radius) !important;
  padding: 0.35rem !important;
  margin-bottom: 1.25rem !important;
  box-shadow: var(--crm-shadow-sm) !important;
}

.hub-subnav-scroll {
  display: flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  overflow-x: auto !important;
}

.hub-subnav-tab {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  padding: 0.45rem 0.95rem !important;
  border-radius: 7px !important;
  border: none !important;
  background: transparent !important;
  color: var(--crm-text-secondary) !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.15s ease !important;
}

.hub-subnav-tab:hover {
  background: #F1F5F9 !important;
  color: var(--crm-text-heading) !important;
}

.hub-subnav-tab.active {
  background: var(--crm-primary) !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.25) !important;
}

/* --- 7. Main Content, Cards & Tables --- */
.main-content {
  padding: 1.5rem !important;
  flex: 1 !important;
}

/* Modern Card Elevation */
.card,
.stat-card,
.metrics-card,
.panel-card {
  background: #FFFFFF !important;
  border: 1px solid var(--crm-border) !important;
  border-radius: var(--crm-radius-lg) !important;
  box-shadow: var(--crm-shadow-sm) !important;
  padding: 1.25rem !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.card:hover,
.stat-card:hover {
  box-shadow: var(--crm-shadow-md) !important;
}

/* Clean Tables */
table,
.data-table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid var(--crm-border) !important;
  border-radius: var(--crm-radius) !important;
  overflow: hidden !important;
  background: #FFFFFF !important;
}

table th,
.data-table th {
  background: #F8FAFC !important;
  color: var(--crm-text-secondary) !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 0.85rem 1rem !important;
  border-bottom: 1px solid var(--crm-border) !important;
  text-align: left !important;
}

table td,
.data-table td {
  padding: 0.85rem 1rem !important;
  border-bottom: 1px solid #F1F5F9 !important;
  font-size: 0.875rem !important;
  color: var(--crm-text-primary) !important;
  vertical-align: middle !important;
}

table tr:last-child td,
.data-table tr:last-child td {
  border-bottom: none !important;
}

table tr:hover td,
.data-table tr:hover td {
  background-color: var(--crm-bg-hover) !important;
}

/* Status Badges */
.badge,
.status-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  padding: 0.25rem 0.65rem !important;
  border-radius: 9999px !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
}

.badge-success, .status-confirmed, .status-paid {
  background: #DCFCE7 !important;
  color: #166534 !important;
}

.badge-warning, .status-pending {
  background: #FEF3C7 !important;
  color: #92400E !important;
}

.badge-danger, .status-cancelled, .status-overdue {
  background: #FEE2E2 !important;
  color: #991B1B !important;
}

.badge-info, .status-issued {
  background: #E0F2FE !important;
  color: #0369A1 !important;
}

/* --- 9. Mobile Bottom Nav (Strictly Mobile Only, Hidden on Desktop) --- */
@media (min-width: 769px) {
  .pwa-bottom-nav,
  #pwa-bottom-nav,
  .bottom-nav {
    display: none !important;
    visibility: hidden !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   🔒 ZERO-DATA-LEAKAGE AUTH GUARD (LOGIN / PENDING / LOGGED-OUT)
   ═══════════════════════════════════════════════════════════ */
body.auth-logged-out #pwa-bottom-nav,
body.auth-logged-out .pwa-bottom-nav,
body.auth-logged-out #pwa-install-bar,
body.auth-logged-out .bottom-nav,
body.auth-logged-out .app-topbar,
body.auth-logged-out .sidebar,
body.auth-logged-out .hub-subnav-strip,
.auth-nav-hidden,
#pwa-bottom-nav.auth-nav-hidden,
.pwa-bottom-nav.auth-nav-hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  z-index: -9999 !important;
}

body.auth-logged-out,
body.auth-logged-out #app,
body.auth-logged-out .main-content {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  overflow-x: hidden !important;
}

@media (min-width: 769px) {
  .pwa-bottom-nav,
  #pwa-bottom-nav,
  .bottom-nav,
  #pwa-install-bar {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    bottom: -9999px !important;
  }
}

.pwa-nav-item {
  color: var(--crm-text-secondary) !important;
  transition: color 0.15s ease !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  background: none !important;
  border: none !important;
  padding: 5px 4px !important;
  cursor: pointer !important;
  flex: 1 1 0 !important;
  min-width: 0 !important;
  position: relative !important;
}

.pwa-nav-item i {
  font-size: 1.25rem !important;
  line-height: 1 !important;
}

.pwa-nav-label {
  font-size: 10px !important;
  font-weight: 600 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  text-align: center !important;
}

.pwa-nav-item.active {
  color: var(--crm-primary) !important;
}

.pwa-nav-item.active .pwa-nav-label {
  font-weight: 800 !important;
  color: var(--crm-primary) !important;
}

/* Mobile Hamburger Toggle in Topbar */
.sidebar-toggle-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  background: #F8FAFC !important;
  border: 1px solid var(--crm-border) !important;
  border-radius: 8px !important;
  color: var(--crm-text-primary) !important;
  cursor: pointer !important;
}

@media (min-width: 1200px) {
  .sidebar-toggle-btn {
    display: none !important;
  }
}


/* ============================================================
   10. HOMEYINDIA CRM DASHBOARD TRANSFORMATION
   ============================================================ */
.dash-wrap {
  max-width: 1400px !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

/* Dashboard Header */
.dash-hero {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 0 1.5rem 0 !important;
  margin-bottom: 0 !important;
}

.dash-hero-top {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 1rem !important;
}

.dash-title-group .dash-greeting {
  display: none !important;
}

.dash-heading {
  font-size: 1.65rem !important;
  font-weight: 700 !important;
  color: var(--crm-text-heading) !important;
  letter-spacing: -0.02em !important;
  margin: 0 !important;
}

.dash-date-str {
  font-size: 0.875rem !important;
  color: var(--crm-text-secondary) !important;
  margin-top: 0.35rem !important;
  font-weight: 400 !important;
}

/* 4 Core KPI Cards Grid — Matching HomeyIndia CRM */
.dash-kpi-ribbon {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 1rem !important;
  margin-bottom: 1.5rem !important;
}

@media (max-width: 1199px) {
  .dash-kpi-ribbon {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .dash-kpi-ribbon {
    grid-template-columns: 1fr !important;
  }
}

.dash-kpi-card {
  background: #FFFFFF !important;
  border: 1px solid var(--crm-border) !important;
  border-radius: 12px !important;
  padding: 1.25rem !important;
  box-shadow: var(--crm-shadow-sm) !important;
  position: relative !important;
  overflow: hidden !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.dash-kpi-card::before {
  display: none !important;
}

.dash-kpi-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--crm-shadow-md) !important;
  border-color: var(--crm-border-strong) !important;
}

.dash-kpi-top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 0.75rem !important;
}

.dash-kpi-label {
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: var(--crm-text-secondary) !important;
}

/* 36px Tinted Icon Square */
.dash-kpi-icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.25rem !important;
}

.dash-kpi-icon.occupancy {
  background: #E0F2FE !important;
  color: #0284C7 !important;
}

.dash-kpi-icon.checkins {
  background: #DCFCE7 !important;
  color: #16A34A !important;
}

.dash-kpi-icon.checkouts {
  background: #FEF3C7 !important;
  color: #D97706 !important;
}

.dash-kpi-icon.revenue {
  background: #DCFCE7 !important;
  color: #16A34A !important;
}

.dash-kpi-num {
  font-size: 1.65rem !important;
  font-weight: 700 !important;
  color: var(--crm-text-heading) !important;
  letter-spacing: -0.02em !important;
  line-height: 1.2 !important;
}

.dash-kpi-card.revenue .dash-kpi-num {
  color: #16A34A !important;
}

.dash-kpi-sub {
  font-size: 0.8rem !important;
  color: var(--crm-text-secondary) !important;
  margin-top: 0.35rem !important;
}

.dash-progress-bar {
  display: none !important;
}

/* Nav Tabs */
.dash-nav-bar {
  display: flex !important;
  gap: 0.5rem !important;
  padding: 0.35rem !important;
  background: #FFFFFF !important;
  border: 1px solid var(--crm-border) !important;
  border-radius: 10px !important;
  margin-bottom: 1.5rem !important;
}

.dash-nav-tab {
  border: none !important;
  background: transparent !important;
  color: var(--crm-text-secondary) !important;
  padding: 0.5rem 1rem !important;
  border-radius: 7px !important;
  font-size: 0.825rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  transition: all 0.15s ease !important;
  box-shadow: none !important;
}

.dash-nav-tab:hover {
  background: #F1F5F9 !important;
  color: var(--crm-text-heading) !important;
}

.dash-nav-tab.active {
  background: var(--crm-primary) !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.3) !important;
}

.dash-tab-badge {
  background: rgba(0, 0, 0, 0.08) !important;
  border-radius: 9999px !important;
  padding: 2px 6px !important;
  font-size: 0.7rem !important;
}

.dash-nav-tab.active .dash-tab-badge {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #FFFFFF !important;
}

/* Operational Panels */
.dash-panel-card {
  background: #FFFFFF !important;
  border: 1px solid var(--crm-border) !important;
  border-radius: 12px !important;
  padding: 1.25rem !important;
  box-shadow: var(--crm-shadow-sm) !important;
}

.dash-panel-title {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: var(--crm-text-heading) !important;
}

.dash-guest-item {
  background: #F8FAFC !important;
  border: 1px solid var(--crm-border) !important;
  border-radius: 8px !important;
  padding: 0.75rem 1rem !important;
  margin-bottom: 0.5rem !important;
}

.dash-guest-item:hover {
  background: #FFFFFF !important;
  border-color: var(--crm-border-strong) !important;
  box-shadow: var(--crm-shadow-sm) !important;
}


/* Responsive charts grid */
@media (max-width: 1199px) {
  .dash-charts-grid {
    grid-template-columns: 1fr !important;
  }
  .topbar-search-menu-btn .search-btn-text,
  .topbar-search-menu-btn .search-btn-kbd {
    display: none !important;
  }
}


.sidebar-user-card .user-notif-btn {
  background: #FFFFFF !important;
  border: 1px solid var(--crm-border) !important;
  color: #64748B !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
}
.sidebar-user-card .user-notif-btn:hover {
  background: #F1F5F9 !important;
  color: #0F172A !important;
}


.sidebar-brand .brand-sub {
  color: #64748B !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  font-weight: 600 !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.05em !important;
}


/* ═══════════════════════════════════════════════════════════
   📱 COMPREHENSIVE RESPONSIVE ENGINE (Desktop, iPad, Phone & PWA)
   ═══════════════════════════════════════════════════════════ */

/* Universal Overflow & Layout Guard (Preserves sticky positioning in iOS Safari/WebKit) */
html, body {
  overflow-x: clip !important;
  max-width: 100vw !important;
  width: 100% !important;
  position: relative !important;
}

.app-container {
  overflow-x: clip !important;
  max-width: 100vw !important;
  width: 100% !important;
}

.app-main-wrapper {
  overflow-x: clip !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Charts Grid Responsive Behavior */
.dash-charts-grid {
  display: grid !important;
  grid-template-columns: 1.85fr 1.15fr !important;
  gap: 1.25rem !important;
  margin-bottom: 1.5rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.dash-chart-card {
  width: 100% !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

/* Tablet & iPad (768px - 1199px, including iPad Pro 1032px, iPad Air 820px) */
@media (max-width: 1199px) {
  .app-main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .sidebar {
    width: 280px !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    background: #FFFFFF !important;
    z-index: 99999 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 4px 0 24px rgba(0,0,0,0.15) !important;
  }

  .sidebar.mobile-drawer-open {
    transform: translateX(0) !important;
  }

  .sidebar-close-btn {
    display: flex !important;
  }

  .topbar-left .sidebar-toggle-btn {
    display: inline-flex !important;
  }

  .topbar-left .topbar-brand-group {
    display: flex !important;
  }

  .dash-charts-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  .dash-kpi-ribbon {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.85rem !important;
  }
}

/* =========================================================================
   📱 CRITICAL MOBILE TOPBAR & RESPONSIVE ENGINE (< 768px - iPhone & Android)
   ========================================================================= */
@media (max-width: 768px) {
  /* 1. App Topbar (Zero overlap, full iPhone notch & Dynamic Island Safe Area clearance) */
  .app-topbar {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: calc(56px + env(safe-area-inset-top, 0px)) !important;
    min-height: calc(56px + env(safe-area-inset-top, 0px)) !important;
    padding-top: env(safe-area-inset-top, 0px) !important;
    padding-bottom: 0 !important;
    padding-left: max(10px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(10px, env(safe-area-inset-right, 0px)) !important;
    gap: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #FFFFFF !important;
    border-bottom: 1px solid var(--crm-border, #E2E8F0) !important;
    z-index: 1000 !important;
    box-sizing: border-box !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03) !important;
  }

  .topbar-left {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    min-width: 0 !important;
    height: 56px !important;
  }

  /* Remove topbar hamburger menu button on mobile — Menu is handled exclusively in bottom navigation */
  .sidebar-toggle-btn,
  #hamburgerBtn,
  .topbar-left .sidebar-toggle-btn {
    display: none !important;
  }

  .topbar-brand-group {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
  }

  .topbar-brand-group img {
    width: 28px !important;
    height: 28px !important;
    border-radius: 7px !important;
    flex-shrink: 0 !important;
  }

  .topbar-brand-titles {
    display: flex !important;
    flex-direction: column !important;
    line-height: 1.1 !important;
  }

  .topbar-brand-titles .topbar-brand-main {
    font-size: 11px !important;
    font-weight: 900 !important;
    color: #0F172A !important;
    letter-spacing: -0.2px !important;
    white-space: nowrap !important;
  }

  .topbar-brand-titles .topbar-brand-sub {
    font-size: 8px !important;
    color: var(--crm-primary, #0284C7) !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
  }

  .topbar-desktop-nav {
    display: none !important;
  }

  .topbar-right {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
    height: 56px !important;
  }

  /* CRITICAL: HIDE OVERFLOWING PROPERTY SELECTOR, WA STATUS & FETCH PROPERTIES FROM TOPBAR ON MOBILE! */
  .topbar-property-selector,
  .topbar-wa-status-btn,
  .topbar-sync-properties-btn {
    display: none !important;
  }

  /* Compact 36x36 Icon-Only Desk Sheet Button on Mobile so + New Booking always fits cleanly */
  .topbar-desk-sheet-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    gap: 0 !important;
    border-radius: 10px !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }
  .topbar-desk-sheet-btn .topbar-desk-sheet-text {
    display: none !important;
  }

  /* Icon-Only Search Button */
  .topbar-search-menu-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #F8FAFC !important;
    border: 1px solid #E2E8F0 !important;
  }
  .topbar-search-menu-btn .search-btn-icon {
    margin: 0 !important;
    font-size: 1.1rem !important;
    color: #475569 !important;
  }
  .topbar-search-menu-btn .search-btn-text,
  .topbar-search-menu-btn .search-btn-kbd {
    display: none !important;
  }

  /* Vibrant New Booking Plus Button — ALWAYS visible & never squished on mobile */
  .topbar-new-booking-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    background: var(--crm-primary, #0284C7) !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.28) !important;
  }
  .topbar-new-booking-btn .topbar-new-booking-icon {
    margin: 0 !important;
    font-size: 1.2rem !important;
    color: #FFFFFF !important;
  }
  .topbar-new-booking-btn .topbar-new-booking-text {
    display: none !important;
  }

  /* Hide Help ? button on mobile header (accessible in Menu & Help page) */
  .topbar-icon-btn[aria-label="Help & Guide"] {
    display: none !important;
  }

  /* Compact 36px Notification Bell with Absolute Floating Pill Badge */
  #topbarNotifBtn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #F8FAFC !important;
    border: 1px solid #E2E8F0 !important;
    position: relative !important;
    overflow: visible !important;
  }
  #topbarNotifBtn .notif-bell-badge {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    min-width: 17px !important;
    height: 17px !important;
    padding: 0 4px !important;
    border-radius: 999px !important;
    background: #EF4444 !important;
    color: #FFFFFF !important;
    font-size: 9.5px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid #FFFFFF !important;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.5) !important;
    z-index: 10 !important;
    box-sizing: border-box !important;
  }

  /* User Avatar Pill: Circular only, hide text to eliminate overflow */
  .topbar-avatar-pill {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
  }
  .topbar-avatar-pill .user-avatar-mini {
    width: 34px !important;
    height: 34px !important;
    font-size: 12px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12) !important;
  }
  .topbar-avatar-pill div:not(.user-avatar-mini),
  .topbar-avatar-pill .avatar-caret {
    display: none !important;
  }

  /* 2. Main Content & Layout - Mobile Safe Padding (Prevents bottom nav overlap) */
  .main-content, #mainContent {
    padding: 10px 10px calc(88px + env(safe-area-inset-bottom, 12px)) !important;
  }

  /* Hub Sub-navigation Strip on Mobile - Clean horizontally-scrollable native tab pills (Zero Overlap) */
  .hub-subnav-strip {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: calc(56px + env(safe-area-inset-top, 0px)) !important;
    z-index: 990 !important;
    margin: -10px -10px 14px -10px !important;
    padding: 8px 10px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid var(--crm-border, #E2E8F0) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .hub-subnav-scroll {
    display: flex !important;
    width: 100% !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    box-sizing: border-box !important;
    padding: 2px 0 !important;
  }
  .hub-subnav-scroll::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  .hub-subnav-tab {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    padding: 7px 14px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    border-radius: 999px !important;
    min-width: max-content !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: #F1F5F9 !important;
    color: #475569 !important;
    border: 1px solid #CBD5E1 !important;
    box-shadow: none !important;
  }
  .hub-subnav-tab.active {
    background: var(--crm-primary, #0284C7) !important;
    color: #FFFFFF !important;
    border-color: var(--crm-primary, #0284C7) !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35) !important;
  }

  .dash-hero {
    padding: 12px 14px !important;
    margin-bottom: 12px !important;
  }

  .dash-heading {
    font-size: 1.1rem !important;
  }

  .dash-kpi-ribbon {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.65rem !important;
    margin-bottom: 1rem !important;
  }

  .dash-kpi-card {
    padding: 0.85rem !important;
  }

  .dash-kpi-num {
    font-size: 1.25rem !important;
  }

  .dash-kpi-sub {
    font-size: 0.7rem !important;
  }

  .dash-nav-bar {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 4px !important;
    gap: 6px !important;
  }

  .dash-nav-tab {
    padding: 7px 12px !important;
    font-size: 12px !important;
    flex-shrink: 0 !important;
  }

  /* Safe table container */
  .table-responsive, [style*="overflow-x:auto"], [style*="overflow-x: auto"] {
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Fixed PWA Bottom Nav Bar (Mobile Only: Bookings, Properties, Employees, Expenses, Menu) - Strictly Authenticated */
  body:not(.auth-logged-out) .pwa-bottom-nav:not(.auth-nav-hidden),
  body:not(.auth-logged-out) #pwa-bottom-nav:not(.auth-nav-hidden) {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 58px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-top: 1px solid rgba(226, 232, 240, 0.85) !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    z-index: 99999 !important;
    padding-bottom: env(safe-area-inset-bottom, 6px) !important;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06) !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
}

/* Extra safety for compact 360px phones so + New Booking & Desk Sheet never clip */
@media (max-width: 420px) {
  .app-topbar {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  .topbar-brand-titles .topbar-brand-main {
    font-size: 10px !important;
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .topbar-brand-titles .topbar-brand-sub {
    font-size: 7.5px !important;
  }
  .topbar-desk-sheet-btn,
  .topbar-search-menu-btn,
  #topbarNotifBtn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
  }
  .topbar-new-booking-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
  }
  .topbar-avatar-pill .user-avatar-mini {
    width: 30px !important;
    height: 30px !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   CRITICAL MOBILE RESPONSIVE ENGINE (HomeyIndia CRM Design System)
   Eradicates table crushing, 1-letter vertical wrapping, timeline squishing & topbar cramping
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Prevent horizontal screen leakage while allowing inner scroll (clip preserves position: sticky in WebKit) */
  html, body {
    overflow-x: clip !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  /* 1. All table wrappers MUST scroll horizontally with touch physics */
  .table-responsive,
  .table-wrap,
  .table-container,
  .bookings-table-wrap,
  .hh-timeline-viewport,
  .card [style*="overflow-x:auto"],
  .card [style*="overflow-x: auto"],
  [style*="overflow-x:auto"],
  [style*="overflow-x: auto"] {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
  }

  /* 2. All tables MUST remain real tables with guaranteed minimum width (No squashed columns or 1-word-per-line text!) */
  table:not(#dash-tab-flow table),
  .table:not(#dash-tab-flow table),
  .data-table,
  .bookings-table,
  .audit-table,
  .table-wrap table,
  .card table:not(#dash-tab-flow table):not(.hh-timeline-table),
  .dash-chart-card table {
    display: table !important;
    width: max-content !important;
    min-width: 100% !important;
    border-collapse: collapse !important;
    table-layout: auto !important;
  }

  table:not(#dash-tab-flow table):not(#uhhPrintOverlay table):not(.uhh-report-table) th,
  table:not(#dash-tab-flow table):not(#uhhPrintOverlay table):not(.uhh-report-table) td {
    white-space: nowrap !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    vertical-align: middle !important;
  }

  table:not(#dash-tab-flow table):not(#uhhPrintOverlay table):not(.uhh-report-table) th {
    background: #F8FAFC !important;
    color: #475569 !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
  }

  table:not(#dash-tab-flow table) td.wrap,
  table:not(#dash-tab-flow table) td[style*="max-width"] {
    white-space: normal !important;
    min-width: 150px !important;
  }

  /* 🧺 Laundry Page Mobile Refinements */
  .laundry-action-buttons button {
    flex: 1 1 calc(50% - 6px) !important;
    padding: 8px 10px !important;
    font-size: 11.5px !important;
    justify-content: center !important;
  }
  .laundry-action-buttons input[type="month"] {
    flex: 1 1 100% !important;
    width: 100% !important;
    padding: 8px !important;
  }
  .laundry-kpi-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }
  .laundry-kpi-grid .kpi-tile {
    padding: 8px 6px !important;
    border-radius: 8px !important;
    min-width: 0 !important;
  }
  .laundry-kpi-grid .kpi-num {
    font-size: 15px !important;
  }
  .laundry-kpi-grid .kpi-sub {
    font-size: 9.5px !important;
    margin-top: 2px !important;
    white-space: normal !important;
  }

  /* 💼 Expenses Hub Mobile Refinements */
  .exp-action-btn-group button {
    flex: 1 1 calc(50% - 6px) !important;
    padding: 8px 10px !important;
    font-size: 11.5px !important;
    justify-content: center !important;
  }
  .exp-filter-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .exp-filter-grid > .form-group:last-child {
    grid-column: span 2 !important;
  }

  /* Thead & Tbody must preserve normal tabular layout */
  thead,
  .table-wrap thead,
  .card thead {
    display: table-header-group !important;
  }

  tbody,
  .table-wrap tbody,
  .card tbody {
    display: table-row-group !important;
    width: auto !important;
  }

  tr,
  .table-wrap tbody tr,
  .card tbody tr {
    display: table-row !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
  }

  /* 3. Table-to-Card Transformation for Dashboard Lists */
  #dash-tab-flow table,
  #dash-tab-flow thead,
  #dash-tab-flow tbody,
  #dash-tab-flow th,
  #dash-tab-flow td,
  #dash-tab-flow tr {
    display: block !important;
  }

  #dash-tab-flow thead {
    display: none !important; /* Hide headers on mobile cards */
  }

  #dash-tab-flow tr {
    background: #FFFFFF !important;
    border: 1px solid var(--crm-border) !important;
    border-radius: 12px !important;
    padding: 12px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
  }

  #dash-tab-flow td {
    padding: 4px 0 !important;
    border: none !important;
    white-space: normal !important; /* Allow wrapping in cards */
  }

  /* Specific positioning for card elements */
  #dash-tab-flow td:first-child {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: var(--crm-text-heading) !important;
  }

  #dash-tab-flow td:last-child {
    margin-top: 8px !important;
    padding-top: 10px !important;
    border-top: 1px solid var(--crm-border-lighter) !important;
    text-align: left !important;
  }

  #dash-tab-flow .dash-unit-chip,
  #dash-tab-flow span[style*="background:#F1F5F9"] {
    display: inline-block !important;
    margin-bottom: 4px !important;
  }

  /* 4. Responsive Leaderboard Refinements */
  .hh-leaderboard-card {
    padding: 14px 8px !important;
  }
  .hh-leaderboard-table {
    display: table !important;
    min-width: 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    table-layout: auto !important;
  }
  .hh-leaderboard-table th,
  .hh-leaderboard-table td {
    padding: 8px 4px !important;
    font-size: 11px !important;
  }
  .hh-leaderboard-table th:first-child,
  .hh-leaderboard-table td:first-child {
    width: 44% !important;
    min-width: 0 !important;
    max-width: 155px !important;
    overflow: hidden !important;
    padding-left: 2px !important;
  }
  .hh-leaderboard-table th:nth-child(2),
  .hh-leaderboard-table td:nth-child(2) {
    width: 28% !important;
    min-width: 0 !important;
    text-align: right !important;
    white-space: nowrap !important;
    padding-right: 4px !important;
    font-size: 11px !important;
  }
  .hh-leaderboard-table th:nth-child(3),
  .hh-leaderboard-table td:nth-child(3),
  .hh-leaderboard-table .hh-td-occ {
    display: none !important; /* Hide occupancy bar on mobile to give full room to profit and revenue */
  }
  .hh-leaderboard-table th:nth-child(4),
  .hh-leaderboard-table td:nth-child(4) {
    width: 28% !important;
    min-width: 0 !important;
    text-align: right !important;
    white-space: nowrap !important;
    padding-right: 2px !important;
    font-size: 11px !important;
  }
  .hh-leaderboard-table .hh-lead-badge {
    display: none !important; /* Hide badge on mobile to prevent clipping numbers */
  }

  /* Suppress pseudo-card ::before labels that were breaking tables */
  td::before, th::before,
  .table-wrap tbody td::before,
  .card tbody td::before {
    display: none !important;
  }

  /* Multi-column complex tables must have guaranteed minimum widths */
  .sbk-custom-table {
    display: table !important;
    min-width: 980px !important;
  }

  .hh-leaderboard-table {
    display: table !important;
    min-width: 580px !important;
  }

  /* Timeline Table in Calendar — preserve full width so user can swipe through dates */
  .hh-timeline-table {
    display: table !important;
    width: max-content !important;
    min-width: max-content !important;
  }

  /* 2. Unified Timeline & Calendar Fixes */
  .hh-prop-cell, .hh-prop-header-cell {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    font-size: 10px !important;
    padding: 6px 8px !important;
  }

  .hh-prop-thumb {
    width: 28px !important;
    height: 28px !important;
  }

  .hh-prop-name {
    font-size: 10.5px !important;
  }

  .hh-cal-toolbar {
    padding: 10px !important;
  }

  .hh-cal-title {
    font-size: 16px !important;
  }

  .hh-cal-range-selector {
    width: 100% !important;
    justify-content: space-between !important;
  }

  /* TUHH-OD Statement & Ledger Scoped Styles */
  #uhhsLedgerModalOverlay {
    align-items: center !important;
    padding: 10px !important;
  }
  #uhhsLedgerModalOverlay .modal-box {
    width: 100% !important;
    max-width: 900px !important;
    max-height: 94vh !important;
    border-radius: 16px !important;
    margin: auto !important;
    padding: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .uhhs-od-kpi-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
    width: 100% !important;
  }
  .uhhs-od-kpi-card {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    padding: 8px 6px !important;
    border-radius: 8px !important;
    text-align: center !important;
  }
  .uhhs-od-kpi-card .kpi-label {
    font-size: 9.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .uhhs-od-kpi-card .kpi-val {
    font-size: 15px !important;
    font-weight: 800 !important;
    margin-top: 2px !important;
    white-space: nowrap !important;
  }
  .uhhs-od-table-scroll {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 8px !important;
  }
  table.uhhs-od-ledger-table {
    width: 100% !important;
    min-width: 700px !important;
    border-collapse: collapse !important;
    table-layout: auto !important;
    font-size: 12px !important;
  }
  table.uhhs-od-ledger-table th,
  table.uhhs-od-ledger-table td {
    padding: 8px 10px !important;
    font-size: 11.5px !important;
    vertical-align: middle !important;
  }
  table.uhhs-od-ledger-table th:nth-child(1),
  table.uhhs-od-ledger-table td:nth-child(1) {
    width: 90px !important;
    min-width: 90px !important;
    white-space: nowrap !important;
  }
  table.uhhs-od-ledger-table th:nth-child(2),
  table.uhhs-od-ledger-table td:nth-child(2) {
    width: 95px !important;
    min-width: 95px !important;
    white-space: nowrap !important;
  }
  table.uhhs-od-ledger-table th:nth-child(3),
  table.uhhs-od-ledger-table td:nth-child(3) {
    min-width: 260px !important;
    max-width: none !important;
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.35 !important;
  }
  table.uhhs-od-ledger-table th:nth-child(4),
  table.uhhs-od-ledger-table td:nth-child(4) {
    width: 115px !important;
    min-width: 115px !important;
    text-align: right !important;
    white-space: nowrap !important;
  }
  table.uhhs-od-ledger-table th:nth-child(5),
  table.uhhs-od-ledger-table td:nth-child(5) {
    width: 140px !important;
    min-width: 140px !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  /* Compact Modals for Mobile */
  .modal-box {
    width: 95vw !important;
    max-width: 95vw !important;
    margin: 10px auto !important;
    padding: 16px !important;
  }

  .modal-overlay {
    align-items: flex-end !important; /* Bottom sheet style on mobile */
    padding: 0 !important;
  }

  .modal-box {
    border-radius: 20px 24px 0 0 !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }

  .hh-prop-cell-name {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 170px !important;
    white-space: normal !important;
  }

  /* Ensure inputs never overflow */
  input, select, textarea, .form-control {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Ensure charts fit container */
  canvas, .dash-chart-card {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Month Grid Stat Cards on Mobile — Horizontal Compact Ribbon */
  .cal-stat-grid {
    display: flex !important;
    overflow-x: auto !important;
    grid-template-columns: none !important;
    gap: 8px !important;
    padding-bottom: 4px !important;
    margin-bottom: 10px !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .cal-stat-grid .stat-card {
    min-width: 105px !important;
    padding: 8px 10px !important;
    flex-shrink: 0 !important;
  }
  .cal-stat-grid .stat-num {
    font-size: 15px !important;
    line-height: 1.2 !important;
  }
  .cal-stat-grid .stat-label {
    font-size: 9.5px !important;
  }

  /* Calendar Toolbar wrap */
  .hh-cal-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 10px !important;
  }
  .hh-cal-toolbar-left,
  .hh-cal-toolbar-right {
    width: 100% !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 6px !important;
  }
  .hh-cal-legend-bar {
    padding: 6px 10px !important;
    gap: 12px !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    font-size: 11px !important;
  }
  .hh-cal-legend-bar + div {
    padding: 6px 10px !important;
    gap: 12px !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    font-size: 11.5px !important;
  }
}

/* Extra Compact Phones (< 380px) */
@media (max-width: 380px) {
  .dash-kpi-ribbon {
    grid-template-columns: 1fr !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   CRITICAL REFINEMENTS: NO DUAL LOGOS, NO CUT LETTERS, CLEAN SAAS SEARCH
   ═══════════════════════════════════════════════════════════════ */

/* 1. Prevent duplicate logo across all tablet & desktop viewports where sidebar is active */
@media (min-width: 992px) {
  .topbar-left .topbar-brand-group {
    display: none !important;
  }
}

/* 2. Sidebar User Card & Info: Zero Letter Clipping */
.sidebar-user-card {
  padding: 0.75rem 0.85rem !important;
  margin: 0.75rem 0.85rem !important;
  background: #F8FAFC !important;
  border: 1px solid var(--crm-border) !important;
  border-radius: var(--crm-radius) !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
}

.sidebar-user-card .user-info {
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

.sidebar-user-card .user-info .user-name {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: #0F172A !important;
  line-height: 1.35 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.sidebar-user-card .user-info .user-role-badge {
  font-size: 0.72rem !important;
  color: #64748B !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.sidebar-user-card .user-notif-btn {
  margin-left: auto !important;
  flex-shrink: 0 !important;
}

/* 3. Drawer Search Styling: Light SaaS Theme */
.drawer-search {
  padding: 0 0.85rem 0.65rem !important;
}

.drawer-search-wrap {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
}

.drawer-search input {
  width: 100% !important;
  background: #F8FAFC !important;
  border: 1px solid var(--crm-border) !important;
  color: #0F172A !important;
  padding: 0.55rem 1.8rem 0.55rem 2.1rem !important;
  border-radius: 8px !important;
  font-size: 0.8125rem !important;
  line-height: 1.35 !important;
  box-sizing: border-box !important;
  transition: all 0.15s ease !important;
}

.drawer-search input:focus {
  outline: none !important;
  border-color: var(--crm-primary) !important;
  background: #FFFFFF !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15) !important;
}

.drawer-search-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0.55rem 0.75rem !important;
  border-radius: 8px !important;
  background: #F8FAFC !important;
  color: #0F172A !important;
  text-decoration: none !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  border: 1px solid var(--crm-border) !important;
  transition: all 0.15s ease !important;
  margin-bottom: 0.35rem !important;
}

.drawer-search-item:hover {
  background: #F0F9FF !important;
  border-color: var(--crm-primary) !important;
  color: #0284C7 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.12) !important;
}

/* 4. Global Anti-Clipping Typography & Hub Tabs */
.topbar-secondary-tabs a,
.hub-tab-ribbon .hub-tab-item,
.dash-nav-tab {
  white-space: nowrap !important;
  line-height: 1.35 !important;
  text-rendering: optimizeLegibility !important;
}

.cal-name,
.cal-date-num,
.cal-rate {
  line-height: 1.3 !important;
  text-rendering: optimizeLegibility !important;
}

/* 🚫 Single Unified User Profile: Remove duplicate user card from sidebar on desktop */
@media (min-width: 992px) {
  .sidebar .sidebar-user-card {
    display: none !important;
  }
}

/* Calendar Paid / Due Badges */
.cal-pay-tag {
  font-size: 8.5px !important;
  font-weight: 800 !important;
  border-radius: 4px !important;
  padding: 1px 3.5px !important;
  line-height: 1.1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  letter-spacing: 0.2px !important;
}

.cal-pay-tag.due {
  background: #FEE2E2 !important;
  color: #991B1B !important;
  border: 1px solid #FECACA !important;
}

.cal-pay-tag.paid {
  background: #DCFCE7 !important;
  color: #166534 !important;
  border: 1px solid #86EFAC !important;
}

.cal-pay-micro {
  display: none !important;
}
.cal-pay-full {
  display: inline !important;
}

@media (max-width: 640px) {
  .cal-pay-full {
    display: none !important;
  }
  .cal-pay-micro {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 8px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
  }
  .cal-pay-tag.is-micro {
    width: 13px !important;
    height: 13px !important;
    min-width: 13px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    border-width: 1px !important;
  }
  .cal-day {
    min-height: 54px !important;
    height: 54px !important;
    border-radius: 6px !important;
    padding: 2px 1.5px !important;
  }
  .cal-empty {
    min-height: 54px !important;
    height: 54px !important;
  }
  .cal-date-num {
    font-size: 10px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
  }
  .cal-rate {
    font-size: 8px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
  }
  .cal-pill {
    font-size: 9.5px !important;
    padding: 2px 1.5px !important;
    min-height: 24px !important;
    height: 24px !important;
  }
  .cal-name {
    font-size: 9.5px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.1px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    text-align: center !important;
  }
  .cal-stay-connector {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    font-size: 9px !important;
    line-height: 1 !important;
  }
  .cal-stay-desk-name {
    display: none !important;
  }
  .cal-prop-carousel::-webkit-scrollbar {
    display: none !important;
  }
}


/* ==========================================================================
   HOMEYHUTS VACATION RENTAL UNIFIED MULTI-CALENDAR & ANALYTICS SUITE
   Pixel-perfect implementation of Homeyhuts SaaS UI
   ========================================================================== */

/* --- 1. UNIFIED TIMELINE MULTI-CALENDAR (GANTT VIEW) --- */
.hh-cal-container {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  margin-bottom: 24px;
}

.hh-cal-toolbar {
  padding: 16px 20px;
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.hh-cal-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hh-cal-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hh-cal-title {
  font-size: 20px;
  font-weight: 800;
  color: #0F172A;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hh-cal-range-selector {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  padding: 4px 8px;
}

.hh-cal-nav-btn {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: #0F172A;
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  transition: all 0.15s ease;
}
.hh-cal-nav-btn:hover {
  background: #0284C7;
  color: #FFFFFF;
  border-color: #0284C7;
}

.hh-cal-range-label {
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
  padding: 0 6px;
  white-space: nowrap;
}

.hh-cal-toggle-group {
  display: inline-flex;
  background: #F1F5F9;
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}

.hh-cal-toggle-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #64748B;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hh-cal-toggle-btn.active {
  background: #FFFFFF;
  color: #0284C7;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.hh-btn-offline-booking {
  background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
  transition: all 0.2s ease;
}
.hh-btn-offline-booking:hover {
  background: linear-gradient(135deg, #0369A1 0%, #075985 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
}

/* Legend strip */
.hh-cal-legend-bar {
  padding: 10px 20px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #475569;
}

.hh-cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.hh-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}

/* Timeline Viewport & Matrix (Freeze Panes Engine) */
.hh-timeline-viewport {
  overflow-x: auto !important;
  overflow-y: auto !important;
  max-height: min(760px, calc(100vh - 210px)) !important;
  position: relative !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  background: #FFFFFF !important;
  max-width: 100% !important;
  border-radius: 0 0 12px 12px !important;
}

.hh-timeline-table {
  position: static !important;
  width: max-content;
  min-width: 100%;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

/* 1. TOP-LEFT INTERSECTION CELL (Frozen Both Top & Left) */
.hh-timeline-table thead th.hh-prop-header-cell,
.hh-prop-header-cell {
  position: sticky !important;
  left: 0 !important;
  top: 0 !important;
  z-index: 100 !important;
  background: #F8FAFC !important;
  border-right: 2px solid #CBD5E1 !important;
  border-bottom: 2px solid #CBD5E1 !important;
  padding: 10px 14px !important;
  width: 240px !important;
  min-width: 240px !important;
  max-width: 240px !important;
  box-shadow: 4px 4px 10px rgba(15, 23, 42, 0.08) !important;
  box-sizing: border-box !important;
}

/* 2. TOP DATE HEADER COLUMNS (Frozen Vertically at Top) */
.hh-timeline-table thead th,
.hh-timeline-table thead th.hh-date-col-header,
.hh-date-col-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 80 !important;
  background: #F8FAFC !important;
  border-bottom: 2px solid #CBD5E1 !important;
  border-right: 1px solid #E2E8F0 !important;
  text-align: center !important;
  padding: 6px 3px !important;
  user-select: none !important;
  box-sizing: border-box !important;
  vertical-align: middle !important;
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.04) !important;
}

.hh-timeline-table thead th.hh-date-col-header.is-weekend {
  background: #F1F5F9 !important;
}

.hh-timeline-table thead th.hh-date-col-header.is-today {
  background: #FEF2F2 !important;
  border-bottom: 2px solid #EF4444 !important;
}

/* 3. LEFT PROPERTY CELLS (Frozen Horizontally at Left) */
.hh-timeline-table tbody td.hh-prop-cell,
.hh-prop-cell {
  position: sticky !important;
  left: 0 !important;
  z-index: 60 !important;
  background: #FFFFFF !important;
  border-right: 2px solid #CBD5E1 !important;
  border-bottom: 1px solid #E2E8F0 !important;
  width: 240px !important;
  min-width: 240px !important;
  max-width: 240px !important;
  box-shadow: 4px 0 10px rgba(15, 23, 42, 0.06) !important;
  box-sizing: border-box !important;
  padding: 0 !important;
  margin: 0 !important;
}

.hh-prop-header-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #0F172A;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hh-prop-card {
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  box-sizing: border-box;
  border-bottom: 1px solid #E2E8F0;
  background: #FFFFFF !important;
}

.hh-prop-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #E2E8F0;
  background: #F1F5F9;
}

.hh-prop-info {
  min-width: 0;
  flex: 1;
}

.hh-prop-name {
  font-size: 12.5px;
  font-weight: 800;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.hh-prop-sub {
  font-size: 10.5px;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hh-prop-rate-tag {
  color: #0284C7;
  font-weight: 700;
  font-size: 10px;
}

/* Date Timeline Header Columns */
.hh-date-col-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #F8FAFC;
  border-bottom: 2px solid #CBD5E1;
  border-right: 1px solid #E2E8F0;
  text-align: center;
  padding: 6px 3px;
  user-select: none;
  box-sizing: border-box;
  vertical-align: middle;
}

.hh-date-col-header.is-weekend {
  background: #F1F5F9;
}

.hh-date-col-header.is-today {
  background: #FEF2F2;
  border-bottom-color: #EF4444;
}

.hh-day-name {
  font-size: 10.5px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.hh-day-num {
  font-size: 14px;
  font-weight: 800;
  color: #0F172A;
  margin-top: 1px;
}

.hh-today-pin-badge {
  background: #EF4444;
  color: #FFFFFF;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 9.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 1px;
  box-shadow: 0 1px 4px rgba(239, 68, 68, 0.4);
}

.hh-today-vertical-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #EF4444;
  z-index: 22;
  pointer-events: none;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

/* Property Row Timeline Track */
.hh-timeline-row {
  height: 54px;
  border-bottom: 1px solid #E2E8F0;
  box-sizing: border-box;
  background: #FFFFFF;
}

.hh-timeline-track {
  position: relative;
  height: 54px;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

/* Background Day Cells */
.hh-day-cell {
  position: absolute;
  top: 0;
  bottom: 0;
  border-right: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  box-sizing: border-box;
}

.hh-day-cell.is-weekend {
  background: #FAFAFC;
}

.hh-day-cell.is-today {
  background: #FEF2F2;
}

.hh-day-rate-hint {
  font-size: 9.5px;
  color: #94A3B8;
  font-weight: 600;
  transition: opacity 0.15s ease;
}

.hh-day-cell:hover {
  background: #E0F2FE !important;
}

.hh-day-cell:hover .hh-day-rate-hint {
  display: none;
}

.hh-day-cell:hover::after {
  content: '+ Book';
  font-size: 9.5px;
  font-weight: 800;
  color: #FFFFFF;
  background: #0284C7;
  padding: 1px 6px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.3);
}

/* Reservation Gantt Bar - Professional Compact Height */
.hh-gantt-bar {
  position: absolute;
  top: 7px;
  height: 40px;
  border-radius: 8px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3px 7px;
  box-sizing: border-box;
  cursor: pointer;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease, z-index 0.15s ease;
  overflow: hidden;
  user-select: none;
}

.hh-gantt-bar:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.22);
  z-index: 28 !important;
}

.hh-gantt-bar.direct {
  background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%);
  border: 1px solid #0284C7;
}

.hh-gantt-bar.airbnb {
  background: linear-gradient(135deg, #FF385C 0%, #E11D48 100%);
  border: 1px solid #FF385C;
}

.hh-gantt-bar.bookingcom {
  background: linear-gradient(135deg, #003580 0%, #1E3A8A 100%);
  border: 1px solid #003580;
}

.hh-gantt-bar.blocked {
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
  border: 1px solid #475569;
}

.hh-gantt-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
  line-height: 1.15;
}

.hh-gantt-guest {
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hh-gantt-status-tag {
  font-size: 8.5px;
  font-weight: 800;
  border-radius: 3px;
  padding: 1px 4px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.2px;
  line-height: 1.15;
}

.hh-gantt-status-tag.mini {
  padding: 0 3px;
  min-width: 15px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8.5px;
  border-radius: 3px;
}

.hh-gantt-status-tag.paid {
  background: #10B981;
  color: #FFFFFF;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.4);
}

.hh-gantt-status-tag.due {
  background: #F59E0B;
  color: #FFFFFF;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.4);
}

.hh-gantt-bottom-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.hh-gantt-amount {
  font-weight: 800;
  color: #FFFFFF;
}

/* Tooltip on Gantt Bar */
.hh-gantt-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #0F172A;
  color: #FFFFFF;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 50;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.hh-gantt-bar:hover .hh-gantt-tooltip {
  opacity: 1;
}

/* --- 2. HOMEYHUTS VACATION RENTAL ANALYTICS DASHBOARD --- */
.hh-analytics-wrap {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  margin-bottom: 24px;
}

.hh-analytics-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap; /* Keep it in one row and allow scroll */
  overflow-x: auto;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #E2E8F0;
  margin-bottom: 20px;
  scrollbar-width: none; /* Hide scrollbar Firefox */
  -webkit-overflow-scrolling: touch;
}

.hh-analytics-filter-bar::-webkit-scrollbar {
  display: none; /* Hide scrollbar Chrome/Safari */
}

.hh-analytics-filters-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap; /* Maintain single row */
}

.hh-analytics-pill-select {
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: #0F172A;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.hh-analytics-btn-excel {
  background: #F0FDF4;
  border: 1px solid #86EFAC;
  color: #166534;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.hh-analytics-btn-excel:hover {
  background: #DCFCE7;
  border-color: #4ADE80;
  transform: translateY(-1px);
}

/* Dashboard Timeframe Controller & Toggle Group */
.dash-period-toggle-group {
  display: inline-flex;
  align-items: center;
  background: #F1F5F9;
  border-radius: 999px;
  padding: 3px;
  gap: 3px;
  border: 1px solid #E2E8F0;
}

.dash-period-btn {
  background: transparent;
  border: none;
  outline: none;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: #64748B;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dash-period-btn:hover {
  color: #0F172A;
}

.dash-period-btn.active {
  background: #FFFFFF;
  color: #0284C7;
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.hh-analytics-pill-select input[type="month"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  z-index: 2;
}

@media (max-width: 768px) {
  .hh-analytics-wrap {
    padding: 14px 10px !important;
    border-radius: 14px !important;
    margin-bottom: 16px !important;
  }

  .hh-analytics-filter-bar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid #E2E8F0 !important;
    overflow-x: visible !important;
  }

  .hh-analytics-filters-left {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
  }

  /* Single-line Dashboard Title with green live pulse */
  .hh-analytics-filters-left > div:first-child {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .hh-analytics-filters-left > div:first-child strong {
    font-size: 13.5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: #0F172A !important;
  }

  .hh-analytics-filters-left > span[style*="color:#CBD5E1"] {
    display: none !important;
  }

  /* Horizontal Scroll Strip for Date & Filter Pills */
  .dash-period-toggle-group {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 4px !important;
    padding: 2px 0 !important;
    width: 100% !important;
  }
  .dash-period-toggle-group::-webkit-scrollbar {
    display: none !important;
  }

  .dash-period-btn {
    flex: 1 0 auto !important;
    padding: 6px 12px !important;
    font-size: 11px !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
  }

  .hh-analytics-pill-select {
    padding: 6px 12px !important;
    font-size: 11.5px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    border-radius: 999px !important;
  }

  /* Excel & Refresh Buttons row */
  .hh-analytics-filter-bar > div:last-child {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .hh-analytics-btn-excel, .dash-pill-btn {
    padding: 5px 12px !important;
    font-size: 11.5px !important;
  }

  /* 5 KPI Ribbon on Mobile: 2 Columns */
  .hh-kpi-ribbon-5 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
  }
  .hh-kpi-card-v2 {
    padding: 10px 8px !important;
    border-radius: 12px !important;
  }
  .hh-kpi-card-v2:last-child {
    grid-column: span 2 !important;
  }
  .hh-kpi-main-val {
    font-size: 17px !important;
    letter-spacing: -0.3px !important;
    line-height: 1.15 !important;
    word-break: normal !important;
  }
  .hh-kpi-change-tag {
    font-size: 10px !important;
    padding: 1px 5px !important;
  }
  .hh-kpi-header {
    font-size: 11px !important;
    margin-bottom: 2px !important;
  }
  .hh-chart-card {
    padding: 14px 10px !important;
    border-radius: 14px !important;
    margin-bottom: 14px !important;
  }
}

/* 5 KPI Sparkline Ribbon */
.hh-kpi-ribbon-5 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

@media (max-width: 1200px) {
  .hh-kpi-ribbon-5 {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

.hh-kpi-card-v2 {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
  min-width: 0; /* Prevents flex items from overflowing */
}
.hh-kpi-card-v2:hover {
  border-color: #0284C7;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.08);
}

.hh-kpi-header {
  font-size: 12.5px;
  font-weight: 600;
  color: #64748B;
  margin-bottom: 6px;
}

.hh-kpi-val-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.hh-kpi-main-val {
  font-size: 24px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.hh-kpi-change-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.hh-kpi-change-tag.positive {
  background: #DCFCE7;
  color: #166534;
}

.hh-kpi-change-tag.negative {
  background: #FEE2E2;
  color: #991B1B;
}

.hh-kpi-sparkline {
  margin-top: 10px;
  width: 100%;
  height: 36px;
}

/* Middle Analytics Row: Charts (60% / 40%) */
.hh-charts-row {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

.hh-chart-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.hh-chart-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.hh-chart-title {
  font-size: 15px;
  font-weight: 800;
  color: #0F172A;
  margin: 0;
}

.hh-chart-sub {
  font-size: 11.5px;
  color: #64748B;
  margin-top: 2px;
}

/* Channel Progress Bars */
.hh-channel-row {
  margin-bottom: 14px;
}

.hh-channel-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  margin-bottom: 5px;
}

.hh-channel-name {
  font-weight: 700;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hh-channel-val {
  font-weight: 800;
  color: #0F172A;
}

.hh-channel-bar-track {
  height: 7px;
  background: #F1F5F9;
  border-radius: 999px;
  overflow: hidden;
}

.hh-channel-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s ease;
}

/* Bottom Leaderboard Table */
.hh-leaderboard-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 20px;
}

.hh-leaderboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.hh-leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.hh-leaderboard-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 12px;
  border-bottom: 2px solid #E2E8F0;
}

.hh-leaderboard-table th.hh-th-rev,
.hh-leaderboard-table th.hh-th-net {
  text-align: right !important;
}

.hh-leaderboard-table th.hh-th-occ {
  text-align: center !important;
}

.hh-leaderboard-table td {
  padding: 12px;
  border-bottom: 1px solid #F1F5F9;
  font-size: 13px;
  color: #0F172A;
}

.hh-prop-cell-name {
  font-weight: 700;
  display: table-cell !important;
  vertical-align: middle !important;
  max-width: 220px;
}

.hh-prop-cell-inner {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
}

.hh-occ-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hh-occ-bar-track {
  flex: 1;
  max-width: 120px;
  height: 6px;
  background: #F1F5F9;
  border-radius: 999px;
  overflow: hidden;
}

.hh-occ-bar-fill {
  height: 100%;
  border-radius: 999px;
}

/* Responsive Overrides (iPad & Mobile) */
@media (max-width: 1024px) {
  .hh-kpi-ribbon-5 {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .hh-charts-row {
    grid-template-columns: 1fr !important;
  }
  .hh-prop-cell, .hh-prop-header-cell {
    width: 190px !important;
    min-width: 190px !important;
    max-width: 190px !important;
  }
}

@media (max-width: 768px) {
  .hh-kpi-ribbon-5 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .hh-prop-cell, .hh-prop-header-cell {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    padding: 6px 8px !important;
  }
  .hh-prop-thumb {
    width: 34px !important;
    height: 34px !important;
  }
  .hh-prop-name {
    font-size: 11.5px !important;
  }
  .hh-prop-sub {
    font-size: 9.5px !important;
  }
  .hh-cal-toolbar {
    padding: 12px 14px !important;
  }
  .hh-cal-legend-bar {
    padding: 8px 14px !important;
    gap: 10px !important;
  }
}

@media (max-width: 480px) {
  .hh-kpi-ribbon-5 {
    grid-template-columns: 1fr !important;
  }
}


/* Single Unified Search: Hide any sidebar search completely & style topbar right search */
.drawer-search, #drawerSearchWrap, #drawerSearchResults {
  display: none !important;
}

.topbar-right .topbar-search-menu-btn {
  margin-right: 2px;
  background: #F8FAFC !important;
  border: 1px solid #CBD5E1 !important;
  color: #475569 !important;
  font-weight: 600 !important;
}
.topbar-right .topbar-search-menu-btn:hover {
  background: #FFFFFF !important;
  border-color: #0284C7 !important;
  color: #0284C7 !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.15) !important;
}
.topbar-right .topbar-search-menu-btn .search-btn-kbd {
  background: #E2E8F0 !important;
  border: 1px solid #CBD5E1 !important;
  color: #475569 !important;
  font-weight: 700 !important;
}


/* ═══════════════════════════════════════════════════════════
   ❓ TUHH HELP CENTER & OPERATING GUIDE STYLES
   ═══════════════════════════════════════════════════════════ */
.tuhh-help-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.tuhh-help-hero {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  border-radius: 20px;
  padding: 32px 28px;
  color: #F8FAFC;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15);
  margin-bottom: 24px;
}

.tuhh-help-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(2, 132, 199, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 999px;
  color: #38BDF8;
  font-size: 11.5px;
  font-weight: 800;
  margin-bottom: 16px;
}

.tuhh-pulse-dot {
  width: 8px;
  height: 8px;
  background: #38BDF8;
  box-shadow: 0 0 10px #38BDF8;
  border-radius: 50%;
  display: inline-block;
}

.tuhh-help-hero-title {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin: 0 0 10px 0;
  color: #FFFFFF;
}

.tuhh-help-hero-sub {
  font-size: 14px;
  color: #94A3B8;
  line-height: 1.5;
  max-width: 780px;
  margin: 0 0 22px 0;
}

.tuhh-help-search-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.tuhh-help-search-box {
  flex: 1;
  min-width: 280px;
  position: relative;
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border-radius: 12px;
  padding: 0 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.tuhh-help-search-box input {
  border: none;
  outline: none;
  width: 100%;
  height: 44px;
  padding: 0 10px;
  font-size: 13.5px;
  color: #0F172A;
  font-weight: 600;
}

.tuhh-help-search-clear {
  background: transparent;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

.tuhh-help-cheatsheet-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0284C7;
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  height: 44px;
  transition: all 0.2s;
  white-space: nowrap;
}

.tuhh-help-cheatsheet-btn:hover {
  background: #0369A1;
  transform: translateY(-1px);
}

.tuhh-help-quick-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tuhh-help-quick-label {
  font-size: 12px;
  font-weight: 800;
  color: #94A3B8;
}

.tuhh-quick-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #E2E8F0;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tuhh-quick-pill:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}

.tuhh-help-nav-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 24px;
  -webkit-overflow-scrolling: touch;
}

.tuhh-help-tab-btn {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: #64748B;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.tuhh-help-tab-btn:hover {
  color: #0F172A;
  border-color: #CBD5E1;
}

.tuhh-help-tab-btn.active {
  background: #0284C7;
  color: #FFFFFF;
  border-color: #0284C7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.tuhh-help-section-block {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  padding: 26px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.04);
}

.tuhh-section-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid #F1F5F9;
  padding-bottom: 16px;
}

.tuhh-section-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.tuhh-section-title {
  font-size: 18px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 4px 0;
}

.tuhh-section-subtitle {
  font-size: 12.5px;
  color: #64748B;
  margin: 0;
}

.tuhh-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.tuhh-step-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 18px;
  position: relative;
}

.tuhh-step-num {
  display: inline-block;
  background: #0284C7;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.tuhh-step-title {
  font-size: 14px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 6px;
}

.tuhh-step-desc {
  font-size: 12px;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 12px;
}

.tuhh-step-badge {
  font-size: 11px;
  color: #0284C7;
  font-weight: 700;
}

.tuhh-step-badge kbd {
  background: #E2E8F0;
  border: 1px solid #CBD5E1;
  border-radius: 4px;
  padding: 2px 6px;
  font-weight: 800;
  color: #0F172A;
}

.tuhh-workflow-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tuhh-wf-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 18px;
}

.tuhh-wf-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  color: #0284C7;
  background: #E0F2FE;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.tuhh-wf-content h4 {
  font-size: 14px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 6px 0;
}

.tuhh-wf-content p {
  font-size: 12.5px;
  color: #475569;
  margin: 0 0 8px 0;
}

.tuhh-wf-content ul {
  margin: 0 0 10px 0;
  padding-left: 20px;
  font-size: 12.5px;
  color: #334155;
  line-height: 1.6;
}

.tuhh-tip-box {
  background: #FEF9C3;
  border: 1px solid #FDE047;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: #713F12;
}

.tuhh-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.tuhh-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.tuhh-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.tuhh-info-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 18px;
}

.tuhh-info-box h4 {
  font-size: 14px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tuhh-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #334155;
  margin-bottom: 8px;
}

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

.tuhh-action-inline-btn {
  background: #0284C7;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tuhh-card-compact {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 18px;
}

.tuhh-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
}

.tuhh-card-compact h4 {
  font-size: 13.5px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 6px 0;
}

.tuhh-card-compact p {
  font-size: 12px;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 10px 0;
}

.tuhh-card-link kbd {
  background: #E2E8F0;
  border: 1px solid #CBD5E1;
  border-radius: 4px;
  padding: 2px 6px;
  font-weight: 800;
  font-size: 11px;
  color: #0284C7;
}

.tuhh-wa-card {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 14px;
  padding: 16px;
}

.tuhh-wa-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.tuhh-wa-card h4 {
  font-size: 13px;
  font-weight: 800;
  color: #166534;
  margin: 0 0 4px 0;
}

.tuhh-wa-card p {
  font-size: 11.5px;
  color: #374151;
  line-height: 1.45;
  margin: 0;
}

.tuhh-shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 12px;
}

.tuhh-sc-item {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.15s;
}

.tuhh-sc-item:hover {
  background: #FFFFFF;
  border-color: #0284C7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
}

.tuhh-sc-keys {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.tuhh-kbd-primary {
  background: #0F172A;
  color: #38BDF8;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  box-shadow: 0 2px 0 #020617;
}

.tuhh-kbd-single {
  background: #F8FAFC;
  color: #D97706;
  border: 1px solid #FCD34D;
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 11.5px;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  box-shadow: 0 2px 0 #E2E8F0;
}

.tuhh-sc-or {
  font-size: 10px;
  color: #94A3B8;
  font-weight: 700;
}

.tuhh-sc-badge {
  font-size: 9.5px;
  color: #64748B;
  background: #E2E8F0;
  padding: 2px 5px;
  border-radius: 4px;
  font-weight: 700;
}

.tuhh-sc-details {
  flex: 1;
  min-width: 0;
}

.tuhh-sc-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tuhh-sc-desc {
  font-size: 11px;
  color: #64748B;
  line-height: 1.35;
}

.tuhh-sc-run-btn {
  background: #E0F2FE;
  color: #0284C7;
  border: 1px solid #BAE6FD;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  transition: all 0.15s;
}

.tuhh-sc-run-btn:hover {
  background: #0284C7;
  color: #FFFFFF;
  border-color: #0284C7;
}

.tuhh-faq-item {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 18px;
}

.tuhh-faq-item h4 {
  font-size: 13.5px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tuhh-faq-item p {
  font-size: 12px;
  color: #475569;
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 640px) {
  .tuhh-help-hero {
    padding: 20px 16px;
  }
  .tuhh-help-hero-title {
    font-size: 20px;
  }
  .tuhh-help-search-row {
    flex-direction: column;
  }
  .tuhh-help-cheatsheet-btn {
    width: 100%;
    justify-content: center;
  }
  .tuhh-help-section-block {
    padding: 18px 14px;
  }
  .tuhh-shortcuts-grid {
    grid-template-columns: 1fr;
  }
}


/* ═══════════════════════════════════════════════════════════
   📱 LUXURY MOBILE MENU ARCHITECTURE (TUHH Settings UI)
   ═══════════════════════════════════════════════════════════ */
.tuhh-menu-wrap {
  max-width: 520px;
  margin: 0 auto;
  padding-bottom: 8px;
}

.tuhh-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FFFFFF;
  border: 1px solid var(--crm-border, #E2E8F0);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: all 0.15s ease;
}
.tuhh-profile-card:active {
  transform: scale(0.99);
  background: #F8FAFC;
}

.tuhh-avatar-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--crm-primary, #0284C7) 0%, #0369A1 100%);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.tuhh-profile-info {
  flex: 1;
  min-width: 0;
}
.tuhh-profile-name {
  font-size: 14.5px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.2;
}
.tuhh-profile-role {
  font-size: 11px;
  color: #64748B;
  font-weight: 600;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.tuhh-profile-role span {
  color: #10B981;
  font-size: 8px;
}

.tuhh-menu-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid var(--crm-border, #E2E8F0);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.02);
}
.tuhh-search-icon {
  font-size: 16px;
  color: #94A3B8;
}
.tuhh-menu-search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  background: transparent;
}
.tuhh-kbd-pill {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
}

.tuhh-menu-section {
  margin-bottom: 16px;
}
.tuhh-section-header {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #64748B;
  text-transform: uppercase;
  margin-bottom: 6px;
  padding-left: 6px;
}

.tuhh-menu-group {
  background: #FFFFFF;
  border: 1px solid var(--crm-border, #E2E8F0);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.tuhh-menu-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  cursor: pointer;
  border-bottom: 1px solid #F1F5F9;
  transition: background 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}
.tuhh-menu-row:last-child {
  border-bottom: none;
}
.tuhh-menu-row:active {
  background: #F8FAFC;
}

.tuhh-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.tuhh-row-content {
  flex: 1;
  min-width: 0;
}
.tuhh-row-title {
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.2;
}
.tuhh-row-sub {
  font-size: 10.5px;
  color: #64748B;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tuhh-chevron {
  font-size: 14px;
  color: #CBD5E1;
  flex-shrink: 0;
}

.tuhh-menu-footer {
  text-align: center;
  padding: 16px 12px 24px;
  font-size: 10px;
  color: #64748B;
  line-height: 1.5;
}
.tuhh-mf-brand {
  font-weight: 800;
  color: #0F172A;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.tuhh-mf-cin {
  color: #94A3B8;
  margin-top: 2px;
}
.tuhh-mf-credit {
  color: var(--crm-primary, #0284C7);
  font-weight: 700;
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════
   🏛️ OFFICIAL SYSTEM FOOTER (Clear spacing above bottom nav)
   ═══════════════════════════════════════════════════════════ */
.app-official-system-footer {
  margin-top: 16px !important;
  padding: 14px 12px calc(65px + env(safe-area-inset-bottom, 12px)) !important;
  border-top: 1px solid var(--crm-border, #E2E8F0) !important;
  text-align: center !important;
  font-size: 10.5px !important;
  color: var(--crm-text-secondary, #64748B) !important;
  line-height: 1.4 !important;
}
.app-official-system-footer .footer-legal {
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--crm-text-heading, #0F172A);
  text-transform: uppercase;
  font-size: 10.5px;
}
.app-official-system-footer .footer-meta {
  font-size: 9.5px;
  color: #64748B;
  margin-top: 2px;
}
.app-official-system-footer .footer-credit {
  font-size: 9.5px;
  color: var(--crm-primary, #0284C7);
  font-weight: 700;
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════
   📄 IN-APP PRINT & REPORT OVERLAY (Bulletproof Document Layout)
   ═══════════════════════════════════════════════════════════ */
#uhhPrintOverlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.78) !important;
  z-index: 999999 !important;
  display: flex !important;
  flex-direction: column !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

#uhhPrintCardInner {
  max-width: 980px !important;
  margin: 0 auto !important;
  background: #ffffff !important;
  border-radius: 12px !important;
  padding: 20px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
  box-sizing: border-box !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

#uhhPrintCardInner table,
.uhh-report-table {
  width: 100% !important;
  min-width: 650px !important;
  border-collapse: collapse !important;
  table-layout: auto !important;
  display: table !important;
  font-size: 11.5px !important;
}

#uhhPrintCardInner thead {
  display: table-header-group !important;
}

#uhhPrintCardInner tbody {
  display: table-row-group !important;
}

#uhhPrintCardInner tr {
  display: table-row !important;
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
  border: none !important;
}

#uhhPrintCardInner th,
#uhhPrintCardInner td,
.uhh-report-table th,
.uhh-report-table td {
  display: table-cell !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  max-width: none !important;
  vertical-align: middle !important;
  text-align: left !important;
  padding: 8px 10px !important;
}

#uhhPrintCardInner th::before,
#uhhPrintCardInner td::before,
.uhh-report-table th::before,
.uhh-report-table td::before {
  display: none !important;
  content: none !important;
}

#uhhPrintCardInner td:last-child,
#uhhPrintCardInner th:last-child,
.uhh-report-table td:last-child,
.uhh-report-table th:last-child {
  text-align: right !important;
  white-space: nowrap !important;
}

/* ═══════════════════════════════════════════════════════════
   📱 STRICT RESPONSIVE NAVIGATION ENGINE (DESKTOP VS MOBILE)
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 769px) {
  .pwa-bottom-nav,
  #pwa-bottom-nav,
  .bottom-nav,
  #pwa-install-bar,
  .pwa-bottom-nav [data-page="menu"] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    bottom: -9999px !important;
    opacity: 0 !important;
    z-index: -9999 !important;
  }
}

/* ═══════════════════════════════════════════════════════════ */
/* 💎 HOMEYHUTS LUXURY MAC WINDOW & AI COPILOT ANALYTICS SUITE  */
/* ═══════════════════════════════════════════════════════════ */
.hh-mac-window {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  margin-bottom: 28px;
}

.hh-mac-titlebar {
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hh-mac-dots {
  display: flex;
  gap: 7px;
  align-items: center;
}

.hh-mac-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}
.hh-mac-dot.red { background: #FF5F56; box-shadow: 0 0 0 1px #E0443E; }
.hh-mac-dot.yellow { background: #FFBD2E; box-shadow: 0 0 0 1px #DEA123; }
.hh-mac-dot.green { background: #27C93F; box-shadow: 0 0 0 1px #1AAB29; }

.hh-mac-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #1E293B;
  letter-spacing: -0.2px;
}

.hh-mac-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #059669;
}

.hh-mac-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: hhPulse 2s infinite;
}

@keyframes hhPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hh-window-body {
  padding: 24px 28px;
  background: #FFFFFF;
}

@media (min-width: 1024px) {
  .hh-kpi-ribbon-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }
}

@media (max-width: 768px) {
  .hh-window-body {
    padding: 14px 10px !important;
  }
}

.hh-two-col-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(320px, 1fr);
  gap: 0;
  min-height: 680px;
}

.hh-left-panel {
  padding: 24px;
  background: #FFFFFF;
  border-right: 1px solid #E2E8F0;
}

.hh-right-copilot {
  background: #0D1117;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #F0F6FC;
  background-image: radial-gradient(#262C36 1px, transparent 1px);
  background-size: 16px 16px;
  position: relative;
}

.hh-ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.hh-ai-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 800;
  color: #FFFFFF;
}

.hh-ai-badge {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #FBBF24;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.hh-ai-sub {
  font-size: 12px;
  color: #8B949E;
  margin-bottom: 20px;
  line-height: 1.4;
}

.hh-ai-card {
  background: rgba(22, 27, 34, 0.95);
  border: 1px solid #30363D;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}
.hh-ai-card:hover {
  border-color: #484F58;
  transform: translateY(-1px);
}

.hh-ai-tag {
  color: #FF5A36;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.hh-ai-body {
  font-size: 12.5px;
  line-height: 1.5;
  color: #C9D1D9;
  margin-bottom: 12px;
}

.hh-ai-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hh-ai-btn-primary {
  background: #FFFFFF;
  color: #0D1117;
  font-weight: 800;
  font-size: 11.5px;
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.hh-ai-btn-primary:hover {
  background: #E6EDF3;
}

.hh-ai-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #8B949E;
  font-weight: 700;
  font-size: 11.5px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #30363D;
  cursor: pointer;
  transition: all 0.15s ease;
}
.hh-ai-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

.hh-ai-input-box {
  background: rgba(22, 27, 34, 0.98);
  border: 1.5px solid #30363D;
  border-radius: 999px;
  padding: 5px 6px 5px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.hh-ai-input-box:focus-within {
  border-color: #FF5A36;
}

.hh-ai-input-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF;
  font-size: 12.5px;
  flex: 1;
}
.hh-ai-input-box input::placeholder {
  color: #6E7681;
}

.hh-ai-mic-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #FF5A36;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s ease;
}
.hh-ai-mic-btn:hover {
  background: #E04320;
  transform: scale(1.05);
}

.hh-ai-quick-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.hh-ai-quick-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #8B949E;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.hh-ai-quick-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 1150px) {
  .hh-two-col-layout {
    grid-template-columns: 1fr;
  }
  .hh-left-panel {
    border-right: none;
    border-bottom: 1px solid #E2E8F0;
  }
}

@media (max-width: 768px) {
  body:not(.auth-logged-out) .pwa-bottom-nav:not(.auth-nav-hidden),
  body:not(.auth-logged-out) #pwa-bottom-nav:not(.auth-nav-hidden) {
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 60px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-top: 1px solid rgba(226, 232, 240, 0.9) !important;
    z-index: 99999 !important;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08) !important;
  }
}

/* Universal Print & Mobile Bill Modal Overlay */
.uhh-print-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(15, 23, 42, 0.92) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 9999999 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.uhh-print-body {
  flex: 1 !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 16px 12px calc(40px + env(safe-area-inset-bottom, 16px)) !important;
  background: #F1F5F9 !important;
}

@media (max-width: 768px) {
  body:not(.auth-logged-out) #app,
  body:not(.auth-logged-out) .main-content,
  body:not(.auth-logged-out) .content,
  body:not(.auth-logged-out) .dashboard-container,
  body:not(.auth-logged-out) {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 16px)) !important;
  }

  /* 📱 Enhanced PWA Bottom Nav Bar with iPhone & Android Notch/Gesture Bar support */
  body:not(.auth-logged-out) .pwa-bottom-nav:not(.auth-nav-hidden),
  body:not(.auth-logged-out) #pwa-bottom-nav:not(.auth-nav-hidden) {
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: calc(58px + env(safe-area-inset-bottom, 0px)) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-top: 1px solid rgba(226, 232, 240, 0.9) !important;
    z-index: 99999 !important;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08) !important;
  }

  .pwa-nav-item {
    transition: transform 0.15s ease, color 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
  .pwa-nav-item:active {
    transform: scale(0.92);
  }

  #uhhPrintCardInner {
    padding: 14px 12px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 12px !important;
  }
  .uhh-invoice-document,
  .invoice-doc {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Universal Touch Tables & Modals */
  .table-responsive,
  .table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 10px;
  }

  .modal-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .modal-box {
    border-radius: 20px 20px 0 0 !important;
    max-height: 90vh !important;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   USER MANAGEMENT & STAFF ACTIVITY — PREMIUM RESPONSIVE OVERHAUL
   ═══════════════════════════════════════════════════════════ */
.user-mgmt-tabs-wrap {
  display: flex !important;
  gap: 8px !important;
  margin-bottom: 14px !important;
  border-bottom: 2px solid #E5E7EB !important;
  padding-bottom: 10px !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.user-mgmt-tabs-wrap::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.user-mgmt-tab-btn {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  border: 1px solid #D1D5DB !important;
  background: #F3F4F6 !important;
  color: #4B5563 !important;
}
.user-mgmt-tab-btn.active {
  background: var(--primary, #0EA5E9) !important;
  color: #FFFFFF !important;
  border-color: var(--primary, #0EA5E9) !important;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.3) !important;
}
.user-mgmt-tab-btn.tab-alerts {
  background: #FEF2F2 !important;
  color: #991B1B !important;
  border-color: #FECACA !important;
}
.user-mgmt-tab-btn.tab-alerts.active {
  background: #DC2626 !important;
  color: #FFFFFF !important;
  border-color: #DC2626 !important;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3) !important;
}
.user-mgmt-tab-btn.tab-work {
  background: #ECFDF5 !important;
  color: #065F46 !important;
  border-color: #A7F3D0 !important;
}
.user-mgmt-tab-btn.tab-work.active {
  background: #059669 !important;
  color: #FFFFFF !important;
  border-color: #059669 !important;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3) !important;
}

.user-mgmt-kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
  gap: 10px !important;
  margin-bottom: 14px !important;
}

.user-mgmt-card-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)) !important;
  gap: 12px !important;
}

/* User Management Action Buttons - Sleek & Flat */
.user-act-group {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 4px !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

.user-act-btn {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  padding: 0 9px !important;
  border-radius: 6px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  border: 1px solid #D1D5DB !important;
  background: #F3F4F6 !important;
  color: #374151 !important;
  cursor: pointer !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03) !important;
  transition: all 0.15s ease !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}
.user-act-btn:hover {
  background: #E5E7EB !important;
  color: #111827 !important;
  transform: translateY(-1px);
}
.user-act-btn::after {
  display: none !important;
  content: none !important;
}

.user-act-btn.btn-audit {
  background: #EFF6FF !important;
  color: #1D4ED8 !important;
  border-color: #BFDBFE !important;
  font-weight: 700 !important;
}
.user-act-btn.btn-audit:hover {
  background: #DBEAFE !important;
  border-color: #93C5FD !important;
}

.user-act-btn.btn-activate {
  background: #ECFDF5 !important;
  color: #047857 !important;
  border-color: #6EE7B7 !important;
  font-weight: 700 !important;
}
.user-act-btn.btn-activate:hover {
  background: #D1FAE5 !important;
}

.user-act-btn.btn-suspend {
  background: #FFFBEB !important;
  color: #B45309 !important;
  border-color: #FCD34D !important;
  font-weight: 700 !important;
}
.user-act-btn.btn-suspend:hover {
  background: #FEF3C7 !important;
}

.user-act-btn.btn-block {
  background: #FEF2F2 !important;
  color: #DC2626 !important;
  border-color: #FCA5A5 !important;
  font-weight: 700 !important;
}
.user-act-btn.btn-block:hover {
  background: #FEE2E2 !important;
}

.user-act-btn.btn-icon-only {
  width: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
  padding: 0 !important;
  font-size: 13px !important;
}

.user-act-btn.btn-logout {
  background: #FFFBEB !important;
  color: #D97706 !important;
  border-color: #FDE68A !important;
}
.user-act-btn.btn-logout:hover {
  background: #FEF3C7 !important;
}

.user-act-btn.btn-delete {
  background: #FEF2F2 !important;
  color: #DC2626 !important;
  border-color: #FECACA !important;
}
.user-act-btn.btn-delete:hover {
  background: #FEE2E2 !important;
}

.user-audit-modal-box {
  background: #FFFFFF !important;
  border-radius: 20px !important;
  width: 100% !important;
  max-width: 780px !important;
  max-height: 92vh !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 25px 60px rgba(0,0,0,0.35) !important;
  overflow: hidden !important;
  margin: auto !important;
}

.user-audit-table-wrap {
  width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  border-radius: 12px !important;
  border: 1px solid #E2E8F0 !important;
  background: #FFFFFF !important;
}

@media (max-width: 768px) {
  .user-mgmt-kpi-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    margin-bottom: 12px !important;
  }
  .user-mgmt-kpi-grid.user-mgmt-kpi-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .user-mgmt-kpi-grid .stat-card {
    padding: 8px 6px !important;
    margin-bottom: 0 !important;
    border-radius: 8px !important;
    text-align: center !important;
  }
  .user-mgmt-kpi-grid .stat-num {
    font-size: 18px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
  }
  .user-mgmt-kpi-grid .stat-label {
    font-size: 10px !important;
    font-weight: 700 !important;
    margin-top: 2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .user-audit-modal-box {
    max-height: 94vh !important;
    border-radius: 18px 18px 0 0 !important;
  }
  .user-mgmt-tabs-wrap {
    padding-bottom: 8px !important;
    margin-bottom: 12px !important;
  }
  .user-mgmt-tab-btn {
    padding: 7px 12px !important;
    font-size: 12px !important;
  }
}

@media print {
  body > *:not(#uhhPrintOverlay) {
    display: none !important;
  }
  #uhhPrintOverlay {
    position: static !important;
    background: #fff !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .no-print, .uhh-print-toolbar, .uhh-print-topbar, .uhh-mobile-bottom-bar, .modal-overlay:not(#uhhPrintOverlay) {
    display: none !important;
  }
  .uhh-print-body {
    padding: 0 !important;
    background: #fff !important;
    overflow: visible !important;
  }
  #uhhPrintCardInner {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}
