/* ==========================================================================
   RetailPulse TailAdmin Redesign Theme (app.css)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Font Family tokens */
  --rp-font-primary: 'Inter', sans-serif;
  --rp-font-display: 'Inter', sans-serif;

  /* Spacing / Border Radius (TailAdmin Standard) */
  --rp-radius-lg: 10px;
  --rp-radius-md: 6px;
  --rp-radius-sm: 4px;
  --rp-transition-speed: 0.25s;
  --rp-transition-ease: ease-in-out;

  /* TailAdmin Color Palette (Light Theme) */
  --rp-bg-body: #f8fafc;
  --rp-bg-surface: #ffffff;
  --rp-bg-card: #ffffff;
  --rp-border-color: #e2e8f0;
  --rp-text-primary: #1c2434;
  --rp-text-secondary: #334155;
  --rp-text-muted: #475569;
  --rp-primary: #2563eb;
  --rp-primary-hover: #1d4ed8;
  --rp-primary-text: var(--rp-primary);
  --rp-primary-gradient: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  /* Flat Solid Color in TailAdmin */
  --rp-accent: #047857;
  --rp-accent-pulse: rgba(4, 120, 87, 0.3);
  --rp-input-bg: #ffffff;
  --rp-input-border: #d2d6dc;
  --rp-input-focus-border: #2563eb;
  --rp-shadow-sm: 0px 1px 2px rgba(0, 0, 0, 0.05);
  --rp-shadow-md: 0px 8px 24px rgba(149, 157, 165, 0.1);
  --rp-shadow-lg: 0px 15px 35px rgba(0, 0, 0, 0.05);

  --bs-body-bg: var(--rp-bg-body);
  --bs-body-color: var(--rp-text-primary);
}



/* ==========================================================================
   Base Elements Resets & Overrides
   ========================================================================== */

body {
  font-family: var(--rp-font-primary);
  background-color: var(--rp-bg-body) !important;
  color: var(--rp-text-primary) !important;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color var(--rp-transition-speed) var(--rp-transition-ease),
    color var(--rp-transition-speed) var(--rp-transition-ease);
}



h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
  font-family: var(--rp-font-display);
  font-weight: 600;
  color: var(--rp-text-primary);
}

.text-rp-secondary {
  color: var(--rp-text-secondary) !important;
}

.text-rp-muted {
  color: var(--rp-text-muted) !important;
}

.text-rp-accent {
  color: var(--rp-accent) !important;
}

/* ==========================================================================
   Cards (TailAdmin Flat Panel Theme)
   ========================================================================== */

.rp-card,
.rp-glass-card {
  background: var(--rp-bg-card) !important;
  border: 1px solid var(--rp-border-color) !important;
  border-radius: var(--rp-radius-lg) !important;
  box-shadow: var(--rp-shadow-sm) !important;
  transition: all var(--rp-transition-speed) var(--rp-transition-ease);
  backdrop-filter: none !important;
  /* Remove glassmorphic blur */
  -webkit-backdrop-filter: none !important;
}

/* Clickable Action Cards styling (Analytics navigation) */
.action-card {
  background-color: var(--rp-bg-card) !important;
  border: 1px solid var(--rp-border-color) !important;
  transition: all var(--rp-transition-speed) var(--rp-transition-ease) !important;
}

.action-card h5,
.action-card .card-title,
.action-card .text-dark {
  color: var(--rp-primary-text) !important;
}

.action-card p,
.action-card .text-muted {
  color: var(--rp-text-muted) !important;
}

/* Card internal elements color inheritance */
.card-header,
.card-title,
.card-subtitle,
.rp-card .card-header,
.rp-glass-card .card-header,
.rp-card .card-title,
.rp-glass-card .card-title,
.rp-card h1,
.rp-card h2,
.rp-card h3,
.rp-card h4,
.rp-card h5,
.rp-card h6,
.rp-glass-card h1,
.rp-glass-card h2,
.rp-glass-card h3,
.rp-glass-card h4,
.rp-glass-card h5,
.rp-glass-card h6 {
  color: var(--rp-text-primary) !important;
}

.card-body,
.rp-card .card-body,
.rp-glass-card .card-body {
  color: var(--rp-text-secondary);
}

.rp-card-interactive {
  cursor: pointer;
}

.rp-card-interactive:hover {
  transform: translateY(-2px);
  box-shadow: var(--rp-shadow-md) !important;
  border-color: var(--rp-primary) !important;
}

/* Flat solid Hero card (replaces gradient) */
.rp-hero-card {
  background: var(--rp-primary) !important;
  color: #ffffff !important;
  border: 1px solid var(--rp-primary) !important;
  border-radius: var(--rp-radius-lg) !important;
  box-shadow: var(--rp-shadow-md) !important;
  position: relative;
  overflow: hidden;
  transition: all var(--rp-transition-speed) var(--rp-transition-ease);
}

.rp-hero-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--rp-shadow-lg) !important;
}

.rp-hero-card h1,
.rp-hero-card h2,
.rp-hero-card h3,
.rp-hero-card h4,
.rp-hero-card p {
  color: #ffffff !important;
}

/* ==========================================================================
   Buttons (Flat Solid Brand Theme)
   ========================================================================== */

.rp-btn {
  font-family: var(--rp-font-display);
  font-weight: 500;
  padding: 0.6rem 1.25rem;
  border-radius: var(--rp-radius-md) !important;
  transition: all 0.2s var(--rp-transition-ease);
  border: 1px solid transparent;
}

.rp-btn:hover {
  transform: translateY(-1px);
}

.rp-btn:active {
  transform: translateY(0);
}

.rp-btn-primary {
  background: var(--rp-primary) !important;
  border: 1px solid var(--rp-primary) !important;
  color: #ffffff !important;
  box-shadow: var(--rp-shadow-sm) !important;
}

.rp-btn-primary:hover {
  background: var(--rp-primary-hover) !important;
  border-color: var(--rp-primary-hover) !important;
  box-shadow: var(--rp-shadow-md) !important;
  color: #ffffff !important;
}

.rp-btn-secondary {
  background: var(--rp-bg-surface) !important;
  border: 1px solid var(--rp-border-color) !important;
  color: var(--rp-text-primary) !important;
}

.rp-btn-secondary:hover {
  border-color: var(--rp-primary) !important;
  color: var(--rp-primary) !important;
  background: var(--rp-bg-body) !important;
}

/* ==========================================================================
   Forms & Outline Inputs
   ========================================================================== */

.rp-form-control {
  background-color: var(--rp-input-bg) !important;
  border: 1.5px solid var(--rp-input-border) !important;
  color: var(--rp-text-primary) !important;
  border-radius: var(--rp-radius-md) !important;
  padding: 0.7rem 0.9rem !important;
  font-family: var(--rp-font-primary) !important;
  transition: all var(--rp-transition-speed) var(--rp-transition-ease);
}

.rp-form-control:focus {
  border-color: var(--rp-primary) !important;
  box-shadow: 0 0 0 3px rgba(60, 80, 224, 0.15) !important;
  background-color: var(--rp-bg-surface) !important;
  outline: none;
}

/* Global placeholder styles for all inputs/controls */
.form-control::placeholder,
.rp-form-control::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--rp-text-secondary) !important;
  opacity: 0.65 !important;
}

.form-floating>.rp-form-control:focus~label,
.form-floating>.rp-form-control:not(:placeholder-shown)~label {
  color: var(--rp-primary) !important;
}

.form-floating>label {
  color: var(--rp-text-secondary);
}

.input-group {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: stretch !important;
}

.input-group-text,
.rp-input-group-text {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.rp-input-group-text {
  background-color: var(--rp-bg-body) !important;
  border: 1.5px solid var(--rp-input-border) !important;
  color: var(--rp-text-secondary) !important;
  border-radius: var(--rp-radius-md) !important;
}

/* Validation states */
.rp-form-control.is-valid {
  border-color: var(--rp-accent) !important;
}

.rp-form-control.is-valid:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

.rp-form-control.is-invalid {
  border-color: #f87171 !important;
}

.rp-form-control.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15) !important;
}

/* ==========================================================================
   Navigation Header & Sidebar (Static Layout Grid)
   ========================================================================== */

/* Top Navbar */
.rp-navbar {
  background: var(--rp-bg-surface) !important;
  border-bottom: 1px solid var(--rp-border-color) !important;
  transition: background-color var(--rp-transition-speed) var(--rp-transition-ease);
}

.rp-navbar .nav-link {
  color: var(--rp-text-secondary) !important;
  font-family: var(--rp-font-display);
  font-weight: 500;
  transition: all var(--rp-transition-speed) var(--rp-transition-ease);
}

.rp-navbar .nav-link:hover {
  color: var(--rp-primary-text) !important;
  background-color: rgba(37, 99, 235, 0.05) !important;
}

.rp-navbar .nav-link.active {
  color: #ffffff !important;
  background-color: var(--rp-primary) !important;
}

.rp-navbar #btn-favorites-sort {
  color: var(--rp-text-secondary) !important;
}

.rp-navbar #btn-favorites-sort:hover {
  color: var(--rp-text-primary) !important;
  background-color: var(--rp-bg-body) !important;
}

.rp-navbar .btn-favorite-delete {
  color: var(--rp-text-muted) !important;
}

.rp-navbar .btn-favorite-delete:hover {
  color: #ef4444 !important;
}



/* Sidebar Offcanvas Drawer (Full Height on Desktop) - Default Light Theme */
.rp-drawer {
  background: #ffffff !important;
  border-right: 1px solid var(--rp-border-color) !important;
  color: var(--rp-text-primary) !important;
  transition: all var(--rp-transition-speed) var(--rp-transition-ease);
}

/* Neutralize Bootstrap utility overrides inside drawer for light mode */
.rp-drawer .bg-dark {
  background-color: transparent !important;
}

.rp-drawer .text-white,
.rp-drawer .text-white-50 {
  color: var(--rp-text-primary) !important;
}

.rp-drawer .text-secondary {
  color: var(--rp-text-secondary) !important;
}

.rp-drawer .offcanvas-header {
  border-bottom: 1px solid var(--rp-border-color);
}

.rp-drawer .btn-close {
  filter: none;
  /* default dark close icon for light theme */
}

.rp-drawer-profile-btn {
  background: rgba(0, 0, 0, 0.02) !important;
  border-bottom: 1px solid var(--rp-border-color);
  transition: background-color 0.2s ease;
}

.rp-drawer-profile-btn:hover {
  background: rgba(60, 80, 224, 0.05) !important;
}

.rp-drawer-profile-btn .edit-icon {
  color: var(--rp-text-secondary);
}

.rp-drawer-profile-btn:hover .edit-icon {
  color: var(--rp-primary-text) !important;
}

.rp-drawer-submenu,
.drawer-submenu {
  border-left: 1.5px solid var(--rp-border-color);
  margin-left: 16px;
  margin-right: 12px;
  margin-bottom: 8px;
}

/* Drawer list items (TailAdmin sidebar links) - Light Mode */
.rp-drawer .list-group-item {
  background: transparent !important;
  color: var(--rp-text-secondary) !important;
  border: 0 !important;
  padding: 6px 16px !important;
  font-weight: 500 !important;
  transition: all 0.25s ease;
  font-size: 13px !important;
}

.rp-drawer .list-group-item:hover {
  color: var(--rp-primary-text) !important;
  background: rgba(37, 99, 235, 0.05) !important;
}

.rp-drawer .list-group-item.active {
  color: #ffffff !important;
  font-weight: 500 !important;
  background: var(--rp-primary) !important;
}

.drawer-menu-header {
  color: var(--rp-text-secondary);
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  padding: 10px 16px 4px !important;
  transition: color var(--rp-transition-speed) var(--rp-transition-ease);
  cursor: pointer;
}

/* Hide all dropdown dividers inside the drawer navigation to make it compact */
.rp-drawer .dropdown-divider,
#navDrawer.bg-dark .dropdown-divider {
  display: none !important;
}

.drawer-menu-header:hover {
  color: var(--rp-primary-text) !important;
}

.drawer-menu-header .chevron-icon {
  transition: transform var(--rp-transition-speed) var(--rp-transition-ease);
}

.drawer-menu-header:not(.collapsed) .chevron-icon {
  transform: rotate(180deg);
}

.rp-drawer-submenu .list-group-item,
.drawer-submenu .list-group-item {
  padding-left: 12px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--rp-text-muted, #64748b) !important;
}

.rp-drawer-submenu .list-group-item:hover,
.drawer-submenu .list-group-item:hover {
  color: var(--rp-primary-text, #2563eb) !important;
  background: rgba(37, 99, 235, 0.05) !important;
}




/* ==========================================================================
   Home Dashboard Element Styles
   ========================================================================== */

.user-profile-img-btn {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.user-profile-img-btn:hover {
  transform: scale(1.05);
  box-shadow: 0px 4px 12px rgba(37, 99, 235, 0.2) !important;
  border-color: var(--rp-primary-text) !important;
}

.user-profile-img-btn:active {
  transform: scale(0.96);
}

.nav-card {
  background: rgba(239, 246, 255, 0.75) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1.5px solid rgba(226, 232, 240, 0.8) !important;
  border-radius: 14px !important;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease !important;
  cursor: pointer;
  text-decoration: none !important;
  display: flex;
  flex-direction: column;
  height: 100%;
}


.nav-card:hover {
  transform: translateY(-4px) scale(1.02) !important;
  background-color: rgba(239, 246, 255, 0.9) !important;
  border-color: rgba(37, 99, 235, 0.6) !important;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.15), 0 0 15px rgba(37, 99, 235, 0.2) !important;
}


.nav-card .icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--rp-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, background-color 0.3s ease;
  overflow: hidden;
  box-shadow: var(--rp-shadow-sm);
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
}


.nav-card:hover .icon-box {
  transform: scale(1.08) rotate(3deg) !important;
  box-shadow: var(--rp-shadow-md);
}

.nav-card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--rp-text-primary) !important;
}

.nav-card-text {
  font-size: 13px;
  line-height: 1.4;
  color: var(--rp-text-secondary) !important;
}


.nav-card-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background-color: var(--rp-primary, #2563eb) !important;
  color: #ffffff !important;
  opacity: 0.85;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease !important;
}

.nav-card-arrow span,
.nav-card-arrow .material-symbols-outlined {
  font-size: 18px !important;
  line-height: 1 !important;
  color: #ffffff !important;
}


.nav-card:hover .nav-card-arrow {
  transform: translateX(6px) scale(1.08) !important;
  background-color: var(--rp-primary-hover, #1d4ed8) !important;
  color: #ffffff !important;
  opacity: 1 !important;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.4) !important;
}


.glass-card {
  background: var(--rp-bg-card) !important;
  border: 1px solid var(--rp-border-color) !important;
  border-radius: var(--rp-radius-lg) !important;
  box-shadow: var(--rp-shadow-sm) !important;
  transition: all var(--rp-transition-speed) var(--rp-transition-ease);
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--rp-shadow-md) !important;
}

.dashboard-task-item {
  transition: all 0.2s ease;
  border-radius: var(--rp-radius-sm);
  padding: 0.5rem;
}

.dashboard-task-item:hover {
  background-color: rgba(60, 80, 224, 0.05);
}

.dashboard-event-item {
  transition: all 0.2s ease;
  border-radius: var(--rp-radius-sm);
}

.dashboard-event-item:hover {
  background-color: rgba(60, 80, 224, 0.05) !important;
  border-color: rgba(60, 80, 224, 0.15) !important;
}

/* ==========================================================================
   Login Background Video & Glass Card
   ========================================================================== */

#bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -1;
  filter: brightness(0.45) contrast(1.05) saturate(0.9);
}

.login-glass-card {
  background: var(--rp-bg-surface) !important;
  border: 1px solid var(--rp-border-color) !important;
  box-shadow: var(--rp-shadow-lg) !important;
  color: var(--rp-text-primary) !important;
  border-radius: var(--rp-radius-lg);
}

.login-glass-card .card-title,
.login-glass-card .form-label,
.login-glass-card .card-text {
  color: var(--rp-text-primary) !important;
}

.login-glass-card .text-secondary {
  color: var(--rp-text-secondary) !important;
}

.login-glass-card .input-group-text {
  background-color: var(--rp-bg-body) !important;
  border-color: var(--rp-input-border) !important;
  color: var(--rp-text-secondary) !important;
}

.login-glass-card .form-control {
  background-color: var(--rp-input-bg) !important;
  border-color: var(--rp-input-border) !important;
  color: var(--rp-text-primary) !important;
}

.login-glass-card .form-control::placeholder {
  color: var(--rp-text-secondary) !important;
  opacity: 0.65 !important;
}

.login-glass-card .form-control:focus {
  background-color: var(--rp-bg-surface) !important;
  border-color: var(--rp-primary-text) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.login-glass-card .alert-secondary {
  background-color: var(--rp-bg-body) !important;
  color: var(--rp-text-primary) !important;
  border: 1px solid var(--rp-border-color) !important;
}

.login-glass-card code {
  color: var(--rp-primary-text) !important;
}

/* ==========================================================================
   Profile Page Elements
   ========================================================================== */

.profile-avatar-container {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 1.5rem auto;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--rp-bg-surface);
  box-shadow: var(--rp-shadow-md);
  background-color: var(--rp-bg-body);
  transition: all var(--rp-transition-speed) var(--rp-transition-ease);
}

.profile-avatar-container:hover {
  transform: scale(1.02);
  box-shadow: var(--rp-shadow-lg);
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rp-text-muted);
  background-color: var(--rp-bg-body);
}

.profile-avatar-upload-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(28, 36, 52, 0.85);
  color: #ffffff;
  text-align: center;
  padding: 8px 0;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--rp-transition-speed) var(--rp-transition-ease);
  opacity: 0.85;
}

.profile-avatar-container:hover .profile-avatar-upload-overlay {
  background: rgba(28, 36, 52, 0.95);
}

.field-locked {
  background-color: var(--rp-bg-body) !important;
  border: 1.5px solid var(--rp-border-color) !important;
  color: var(--rp-text-muted) !important;
  cursor: not-allowed;
}

.input-group-locked-text {
  background-color: var(--rp-border-color) !important;
  border: 1.5px solid var(--rp-border-color) !important;
  color: var(--rp-text-muted) !important;
}

.btn-animate {
  transition: all var(--rp-transition-speed) var(--rp-transition-ease);
}

.btn-animate:hover {
  transform: translateY(-1px);
  box-shadow: var(--rp-shadow-md);
}

.profile-section-card {
  border-radius: var(--rp-radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
  transition: all var(--rp-transition-speed) var(--rp-transition-ease);
  border: 1px solid var(--rp-border-color);
  border-left-width: 4px !important;
}

.profile-section-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--rp-shadow-md);
}

/* Section specific styling for a structured forms layout */
.section-personal {
  background-color: var(--rp-bg-surface) !important;
  border-left-color: #3b82f6 !important;
}

.section-personal h6 {
  color: #3b82f6 !important;
}

.section-personal .material-symbols-outlined {
  color: #3b82f6 !important;
}

.section-social {
  background-color: var(--rp-bg-surface) !important;
  border-left-color: #8b5cf6 !important;
}

.section-social h6 {
  color: #8b5cf6 !important;
}

.section-social .material-symbols-outlined {
  color: #8b5cf6 !important;
}

.section-credentials {
  background-color: var(--rp-bg-surface) !important;
  border-left-color: #10b981 !important;
}

.section-credentials h6 {
  color: #10b981 !important;
}

.section-credentials .material-symbols-outlined {
  color: #10b981 !important;
}

.section-password {
  background-color: var(--rp-bg-surface) !important;
  border-left-color: #f97316 !important;
}

.section-password h6 {
  color: #f97316 !important;
}

.section-password .material-symbols-outlined {
  color: #f97316 !important;
}

/* ==========================================================================
   Utility & Micro-animations
   ========================================================================== */

.rp-status-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--rp-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--rp-accent-pulse);
  animation: rp-pulse-animation 1.6s infinite;
}

@keyframes rp-pulse-animation {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 var(--rp-accent-pulse);
  }

  70% {
    transform: scale(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);
  }
}

/* ==========================================================================
   Route Drawer (Delivery Driver Bar)
   ========================================================================== */
.route-drawer {
  position: fixed;
  bottom: -320px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 480px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  color: #fff;
  padding: 12px 16px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
  z-index: 1050;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.route-drawer.show {
  bottom: 16px;
  transform: translateX(-50%);
}

@media (min-width: 992px) {
  .route-drawer {
    top: 80px;
    right: -360px;
    bottom: auto;
    left: auto;
    transform: none;
    width: 320px;
    padding: 12px 14px;
  }

  .route-drawer.show {
    right: 24px;
    bottom: auto;
    transform: none;
  }
}

/* Dynamic body padding adjustments when route drawer is open (mobile only) */
body.route-drawer-open {
  padding-bottom: 220px !important;
}

@media (min-width: 992px) {
  body.route-drawer-open {
    padding-bottom: 0 !important;
  }
}

/* ==========================================================================
   Centralized Header & Sidebar Styles (from header.php)
   ========================================================================== */

#navDrawer.offcanvas {
  border: none !important;
  border-right: none !important;
}

.app-container {
  padding-top: 24px !important;
}

@media (min-width: 992px) {

  /* Make the drawer behave like a fixed sidebar on desktop */
  #navDrawer.offcanvas {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 280px !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
    border-right: 1px solid var(--rp-border-color) !important;
    z-index: 1040 !important;
  }

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

  .app-container {
    padding-left: 280px !important;
    padding-top: 24px !important;
  }

  nav.navbar {
    margin-left: 280px !important;
    width: calc(100% - 280px) !important;
  }
}

/* Favorite button hover styling */
#btn-favorite-toggle {
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease;
  border-radius: 50%;
}

#btn-favorite-toggle:hover {
  transform: scale(1.12);
  background-color: rgba(255, 255, 255, 0.1);
}

#btn-favorite-toggle:active {
  transform: scale(0.9);
}

#btn-favorite-toggle .material-symbols-outlined {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), font-variation-settings 0.2s ease;
}

.btn-favorite-delete {
  color: rgba(255, 255, 255, 0.4) !important;
  transition: color 0.15s ease, transform 0.15s ease;
  right: 6px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 18px !important;
  height: 18px !important;
  z-index: 5 !important;
}

.btn-favorite-delete:hover {
  color: #ef4444 !important;
  transform: translateY(-50%) scale(1.2) !important;
}

.btn-favorite-delete:active {
  transform: translateY(-50%) scale(0.9) !important;
}

.header-favorites-nav-container.sorting-active .btn-favorite-delete {
  display: none !important;
}

.header-favorites-nav-container .nav-link {
  transition: all 0.2s ease;
  font-size: 13px !important;
  padding-right: 28px !important;
}

.header-favorites-nav-container .nav-link:hover {
  color: var(--rp-primary-text) !important;
  background-color: rgba(37, 99, 235, 0.08) !important;
}


/* Drag & Drop Sorting Styles */
.header-favorites-nav-container.sorting-active .nav-item {
  cursor: grab;
  border: 1px dashed rgba(255, 193, 7, 0.4);
  border-radius: 6px;
  position: relative;
  animation: pulse-border 1.5s infinite;
}

.header-favorites-nav-container.sorting-active .nav-item:active {
  cursor: grabbing;
}

.header-favorites-nav-container.sorting-active .nav-link {
  pointer-events: none;
  /* Disable link navigation while sorting */
}

.header-favorites-nav-container .nav-item.over {
  border: 1px solid #ffc107 !important;
  background-color: rgba(255, 193, 7, 0.1);
}

.header-favorites-nav-container .nav-item.dragging {
  opacity: 0.4;
}

@keyframes pulse-border {
  0% {
    border-color: rgba(255, 193, 7, 0.2);
  }

  50% {
    border-color: rgba(255, 193, 7, 0.6);
  }

  100% {
    border-color: rgba(255, 193, 7, 0.2);
  }
}

#btn-favorites-sort {
  transition: all 0.2s ease;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0;
  color: rgba(255, 255, 255, 0.5) !important;
}

#btn-favorites-sort:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
  color: #fff !important;
}

#btn-favorites-sort.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: #10b981 !important;
}

/* Custom Popover Styling */
.popover {
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  background-color: #ffffff !important;
  color: #1e293b !important;
}

.popover-header {
  font-weight: 700;
  background-color: #f8fafc !important;
  color: #0f172a !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
  border-top-left-radius: 11px !important;
  border-top-right-radius: 11px !important;
  font-size: 14px;
}

.popover-body {
  color: #475569 !important;
  font-size: 13px;
}

.popover .popover-arrow::after {
  border-bottom-color: #ffffff !important;
  border-top-color: #ffffff !important;
}

.popover .popover-arrow::before {
  border-bottom-color: rgba(0, 0, 0, 0.12) !important;
  border-top-color: rgba(0, 0, 0, 0.12) !important;
}

/* PWA Prompt Styles */
.pwa-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  width: calc(100% - 32px);
  max-width: 420px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 16px;
  z-index: 2000;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s;
  opacity: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.pwa-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.pwa-toast-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

@media (min-width: 992px) {
  .pwa-toast {
    left: auto;
    right: 24px;
    transform: translateY(100px);
  }

  .pwa-toast.show {
    transform: translateY(0);
  }
}

/* ==========================================================================
   Custom Utility Classes
   ========================================================================== */

/* Typography & Icons */
.fs-xs {
  font-size: 11px !important;
}

.fs-sm {
  font-size: 13px !important;
}

.fs-md {
  font-size: 14px !important;
}

.fs-lg {
  font-size: 18px !important;
}

.fs-xl {
  font-size: 24px !important;
}

.fs-xxl {
  font-size: 80px !important;
}

.font-outfit {
  font-family: 'Outfit', sans-serif !important;
}

.lh-tight {
  line-height: 1.3 !important;
}

.text-transform-capitalize {
  text-transform: capitalize !important;
}

.text-rp-secondary {
  color: var(--rp-text-secondary) !important;
}

/* Sizing & Layout */
.rp-navbar {
  height: 70px !important;
}

.w-logo {
  width: 40px !important;
}

.h-logo {
  height: 40px !important;
}

.w-avatar-md {
  width: 42px !important;
}

.h-avatar-md {
  height: 42px !important;
}

.object-fit-cover {
  object-fit: cover !important;
}

/* Theme Icon settings */
.icon-fill-1 {
  font-variation-settings: 'FILL' 1 !important;
}

.icon-fill-0 {
  font-variation-settings: 'FILL' 0 !important;
}

/* ==========================================================================
   Profile Theme Switcher Selection Cards (from profile/index.php)
   ========================================================================== */

.theme-options-container {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.theme-option-card {
  flex: 1;
  max-width: 180px;
  cursor: pointer;
  position: relative;
}

.theme-option-content {
  background-color: var(--rp-bg-body);
  border: 2px solid var(--rp-border-color);
  border-radius: var(--rp-radius-lg);
  padding: 1.25rem;
  text-align: center;
  transition: all var(--rp-transition-speed) var(--rp-transition-ease);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.theme-option-content:hover {
  border-color: var(--rp-primary);
  transform: translateY(-2px);
  box-shadow: var(--rp-shadow-md);
}

.theme-option-card input:checked+.theme-option-content {
  border-color: var(--rp-primary);
  background-color: var(--rp-bg-surface);
  box-shadow: 0 0 0 4px rgba(60, 80, 224, 0.15), var(--rp-shadow-md);
}

.theme-option-card input:checked+.theme-option-content .theme-icon {
  transform: scale(1.1);
}

.theme-option-card input:checked+.theme-option-content::after {
  content: "check_circle";
  font-family: 'Material Symbols Outlined';
  font-size: 16px;
  color: var(--rp-primary);
  position: absolute;
  top: 8px;
  right: 8px;
  font-variation-settings: 'FILL' 1;
}

.theme-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  transition: transform var(--rp-transition-speed) var(--rp-transition-ease);
}

/* Decimal spacing support for custom layouts */
.gap-1\.5 {
  gap: 0.375rem !important;
}

.gap-2\.5 {
  gap: 0.75rem !important;
}

.px-2\.5 {
  padding-left: 0.625rem !important;
  padding-right: 0.625rem !important;
}

.py-1\.5 {
  padding-top: 0.375rem !important;
  padding-bottom: 0.375rem !important;
}

.p-2\.5 {
  padding: 0.625rem !important;
}


/* ==========================================================================
   Company Social Feed Slider Styles
   ========================================================================== */

.social-slider-container {
  position: relative;
  width: 100%;
  margin-bottom: 2rem;
}

.social-slider-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
  padding: 10px 4px;
}

.social-slider-track::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari/Opera */
}

.social-slider-item {
  flex: 0 0 300px;
  width: 300px;
  transition: transform 0.3s var(--rp-transition-ease), box-shadow 0.3s var(--rp-transition-ease);
}

.social-slider-item:hover {
  transform: translateY(-4px);
}

/* Glassmorphic Navigation Buttons */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #1e293b;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  user-select: none;
}

.slider-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  color: var(--rp-primary-text);
}

.slider-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.slider-btn.prev-btn {
  left: -22px;
}

.slider-btn.next-btn {
  right: -22px;
}


@media (max-width: 768px) {
  .social-slider-item {
    flex: 0 0 270px;
    width: 270px;
  }

  .slider-btn {
    width: 36px;
    height: 36px;
  }

  .slider-btn.prev-btn {
    left: -10px;
  }

  .slider-btn.next-btn {
    right: -10px;
  }
}

@media (max-width: 576px) {
  .social-slider-item {
    flex: 0 0 250px;
    width: 250px;
  }

  /* On very small touch screens, hide arrows since touch swipe is native and easy */
  .slider-btn {
    display: none;
  }
}


/* ==========================================================================
   Mockup Component Classes (from mockup.html design system)
   ========================================================================== */

/* ---- Brand Mark ---- */
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--rp-primary);
  font-weight: 800;
  color: #fff;
  font-family: var(--rp-font-display);
  flex-shrink: 0;
}

/* ---- Stat Icon ---- */
.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 0.85rem;
  display: grid;
  place-items: center;
  font-weight: 800;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

/* Stat icon color variants â€” light theme */
.icon-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.icon-green {
  background: #dcfce7;
  color: #15803d;
}

.icon-orange {
  background: #ffedd5;
  color: #c2410c;
}

.icon-red {
  background: #fee2e2;
  color: #b91c1c;
}

.icon-purple {
  background: #ede9fe;
  color: #6d28d9;
}

.icon-teal {
  background: #ccfbf1;
  color: #0f766e;
}

/* ---- Section Title ---- */
.section-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
  color: var(--rp-text-primary);
  font-family: var(--rp-font-display);
}

/* ---- Card Header flush (no bg, no border) ---- */
.card-header-rp {
  background: transparent !important;
  border-bottom: 0 !important;
  padding: 1.25rem 1.5rem 0.5rem !important;
  color: var(--rp-text-primary);
}

/* ---- Quick Action Card ---- */
.quick-action {
  border: 1px solid var(--rp-border-color);
  border-radius: 1rem;
  padding: 1rem;
  background: var(--rp-bg-card);
  height: 100%;
  text-decoration: none !important;
  color: var(--rp-text-primary);
  display: block;
  transition: all 0.15s ease;
}

.quick-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.08);
  border-color: #bfdbfe;
  color: var(--rp-text-primary);
}


/* ---- Task Row / Activity Row ---- */
.task-row,
.activity-row {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rp-border-color);
}

.task-row:last-child,
.activity-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

/* ---- RP Avatar ---- */
.rp-avatar {
  display: grid;
  place-items: center;
  background: #e0e7ff;
  color: #3730a3;
  font-weight: 800;
  border-radius: 50%;
  flex-shrink: 0;
}

.rp-avatar-sm {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.rp-avatar-md {
  width: 44px;
  height: 44px;
  font-size: 14px;
}

.rp-avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 20px;
}


/* ---- Scanner Panel ---- */
.scanner-panel {
  background: #111827;
  border-radius: 1rem;
  min-height: 360px;
  color: #fff;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.scan-frame {
  width: 210px;
  height: 210px;
  border: 3px solid #60a5fa;
  border-radius: 1.25rem;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.32);
}

/* ---- Info Block ---- */
.info-block {
  background: var(--rp-bg-card);
  border: 1px solid var(--rp-border-color);
  border-radius: 0.75rem;
  padding: 0.75rem;
  transition: border-color 0.15s ease;
}


/* ---- Colleague Row ---- */
.colleague-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--rp-border-color);
  border-radius: 1rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: var(--rp-bg-body);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.colleague-row:last-child {
  margin-bottom: 0;
}

.colleague-row:hover {
  border-color: #bfdbfe;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.07);
}


/* ---- Widget Panel ---- */
.widget-panel {
  background: var(--rp-bg-body);
  border: 1px solid var(--rp-border-color);
  border-radius: 0.75rem;
  padding: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}


/* ---- Task Scroll List ---- */
.task-scroll-list {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--rp-border-color) transparent;
}

.task-scroll-list::-webkit-scrollbar {
  width: 4px;
}

.task-scroll-list::-webkit-scrollbar-track {
  background: transparent;
}

.task-scroll-list::-webkit-scrollbar-thumb {
  background-color: var(--rp-border-color);
  border-radius: 4px;
}

/* ---- Module Icon Cover ---- */
.module-icon-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Badge Micro (9px badges) ---- */
.badge-micro {
  font-size: 9px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em;
}

/* ---- Section Label ---- */
.section-label {
  font-size: 10px !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Task text ---- */
.task-text {
  line-height: 1.4;
  color: var(--rp-text-primary);
}



/* ---- Event Item ---- */
.event-item {
  background: var(--rp-bg-body);
  border: 1px solid var(--rp-border-color);
  border-radius: 0.75rem;
  padding: 0.75rem;
  transition: all 0.2s ease;
}

.event-item:hover {
  border-color: rgba(37, 99, 235, 0.3);
  background: rgba(37, 99, 235, 0.03);
}


/* ---- Drawer nav link font size ---- */
.drawer-nav-link {
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}

.drawer-header-label {
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  padding: 12px 24px 6px;
  cursor: pointer;
  transition: color 0.2s;
}

.drawer-favorites-header {
  font-size: 13.5px;
  letter-spacing: 0.5px;
}

.drawer-chevron-icon {
  font-size: 16px;
}

.drawer-header-bar {
  height: 70px;
}

.drawer-user-name {
  font-size: 14px;
}

.rp-drawer .drawer-user-role {
  font-size: 10px !important;
  font-weight: 600;
  padding: 4px 8px !important;
  border-radius: 50px;
  background-color: #2563eb !important;
  color: #ffffff !important;
  display: inline-block;
  text-transform: none;
  border: none !important;
}


/* ---- Logo Brand ---- */
.drawer-logo-img {
  height: 36px;
  width: 36px;
  object-fit: cover;
  border-radius: 6px;
}

.location-drawer-name {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.logo-brand-text {
  letter-spacing: 0.5px;
  font-family: 'Inter', sans-serif;
}

/* ---- Drawer Avatar ---- */
.drawer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
}

.drawer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drawer-avatar-initials {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  font-weight: bold;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rp-primary);
  color: #fff;
}

/* ---- Drawer Fav Delete ---- */
.drawer-fav-delete {
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  z-index: 5;
  font-size: 14px;
}

/* ---- Modal Profile Header ---- */
.modal-profile-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
}

/* ---- Modal themed body/footer ---- */
.modal-body-themed,
.modal-footer-themed {
  background-color: var(--rp-bg-card) !important;
}


/* ---- User image in modal ---- */
.user-modal-img {
  max-height: 450px;
  object-fit: contain;
  border: 4px solid var(--rp-border-color);
  transition: transform 0.3s ease;
}

/* ---- Nav card text relaxed ---- */
.nav-card-text-relaxed {
  line-height: 1.6;
}

/* ---- Progress Bar custom height ---- */
.rp-progress {
  height: 10px;
  border-radius: 6px;
}

/* ---- Helper notes ---- */
.completed-by-note {
  font-size: 10px;
}

.comment-reason {
  font-size: 11px;
}

.event-time-note {
  font-size: 11px;
}

.event-title-text {
  font-size: 0.95rem;
}

.event-desc-text {
  line-height: 1.4;
  font-size: 12px;
}

.event-added-by {
  font-size: 10px;
}

/* ---- Action button ---- */
.btn-rp-action {
  font-size: 0.9rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* ---- Material icon inline size overrides ---- */
.ms-icon-10 {
  font-size: 10px !important;
}

.ms-icon-14 {
  font-size: 14px !important;
}

.ms-icon-16 {
  font-size: 16px !important;
}

.ms-icon-18 {
  font-size: 18px !important;
}

/* ==========================================================================
   Reusable Unified Filter Select Menus & Input Groups
   ========================================================================== */

.rp-filter-select {
  border-radius: 50rem !important;
  border: 1.5px solid var(--rp-input-border) !important;
  font-family: var(--rp-font-primary) !important;
  font-weight: 600 !important;
  padding: 0.45rem 2.25rem 0.45rem 1.25rem !important;
  background-color: var(--rp-input-bg) !important;
  color: var(--rp-text-secondary) !important;
  transition: all var(--rp-transition-speed) var(--rp-transition-ease);
  cursor: pointer;
  font-size: 13.5px !important;
}

.rp-filter-select:focus {
  border-color: var(--rp-primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  background-color: var(--rp-bg-surface) !important;
  outline: none;
}

/* Optional wrapper styling for input groups with icons */
.rp-pill-input-group {
  border-radius: 50rem !important;
  border: 1.5px solid var(--rp-input-border) !important;
  background-color: var(--rp-input-bg) !important;
  overflow: hidden;
  display: inline-flex !important;
  align-items: center;
  flex-wrap: nowrap !important;
  transition: border-color var(--rp-transition-speed) var(--rp-transition-ease), box-shadow var(--rp-transition-speed) var(--rp-transition-ease);
}

.rp-pill-input-group:focus-within {
  border-color: var(--rp-primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.rp-pill-input-group .rp-input-group-text {
  border: none !important;
  background: transparent !important;
  color: var(--rp-text-secondary) !important;
  padding-left: 1rem !important;
  padding-right: 0.25rem !important;
  display: flex;
  align-items: center;
  flex-shrink: 0 !important;
}

.rp-pill-input-group .rp-filter-select {
  border: none !important;
  background-color: transparent !important;
  padding-left: 0.25rem !important;
  box-shadow: none !important;
}

@media (max-width: 575.98px) {
  .rp-pill-input-group {
    display: flex !important;
    width: 100% !important;
  }

  .rp-pill-input-group .rp-filter-select {
    flex-grow: 1 !important;
    width: 100% !important;
  }
}

/* ==========================================================================
   Responsive Table Reflow Utility (Cards on Mobile)
   ========================================================================== */
@media (max-width: 767.98px) {

  .table-reflow,
  .table-reflow thead,
  .table-reflow tbody,
  .table-reflow th,
  .table-reflow td,
  .table-reflow tr {
    display: block !important;
    width: 100% !important;
  }

  /* Hide header row */
  .table-reflow thead {
    display: none !important;
  }

  /* Transform row into a card */
  .table-reflow tbody tr {
    margin-bottom: 1.25rem;
    padding: 1.25rem 1rem !important;
    border: 1px solid var(--rp-border-color) !important;
    border-radius: var(--rp-radius-lg, 10px) !important;
    background-color: transparent !important;
    box-shadow: none !important;
  }

  /* Prevent background on hover and cells on mobile */
  .table-reflow,
  .table-reflow tr,
  .table-reflow td,
  .table-reflow th,
  .table-reflow tr:hover,
  .table-reflow tr:hover td,
  .table-reflow tr:hover th,
  .table-reflow tr:hover * {
    background-color: transparent !important;
    background: transparent !important;
    --bs-table-accent-bg: transparent !important;
    --bs-table-hover-bg: transparent !important;
    --bs-table-bg-state: transparent !important;
  }

  /* Reset table borders and row colors */
  .table-reflow tbody tr:last-child {
    margin-bottom: 0;
  }

  /* Regular cells with labels */
  .table-reflow tbody td[data-label] {
    border: none !important;
    padding: 0.5rem 0 !important;
    position: relative;
    padding-left: 45% !important;
    text-align: left !important;
    min-height: 2.2rem;
    color: var(--rp-text-primary) !important;
  }

  /* Prepend headers using data-label */
  .table-reflow tbody td[data-label]::before {
    content: attr(data-label);
    position: absolute;
    top: 0.5rem;
    left: 0;
    width: 40%;
    padding-right: 10px;
    font-weight: 600;
    color: var(--rp-text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Actions column specific layout */
  .table-reflow tbody td.table-reflow-actions {
    border: none !important;
    display: block !important;
    width: 100% !important;
    padding: 0.75rem 0 0 0 !important;
    text-align: right !important;
    border-top: 1px solid var(--rp-border-color) !important;
    margin-top: 0.75rem;
  }
}

/* Prominent Admin Drawer Styling */
.drawer-admin-section {
  background: rgba(37, 99, 235, 0.04) !important;
  /* very subtle primary color tint */
  border-left: 3px solid var(--rp-primary);
  /* brand blue left border */
  margin: 12px 16px 8px 16px;
  border-radius: 6px;
  padding-bottom: 8px;
}


.drawer-admin-section .drawer-menu-header {
  color: var(--rp-primary) !important;
  /* brand primary blue header text */
  font-weight: 500 !important;
  padding: 12px 16px 6px 16px !important;
  /* adjust padding to fit nicely inside the container */
}

.drawer-admin-section .drawer-menu-header:hover {
  color: var(--rp-primary-hover) !important;
}

.drawer-admin-section .rp-drawer-submenu,
.drawer-admin-section .drawer-submenu {
  border-left: 1px solid rgba(37, 99, 235, 0.15) !important;
  margin-left: 12px;
  margin-right: 8px;
  margin-bottom: 0px;
}


.drawer-admin-section .list-group-item {
  padding: 8px 16px !important;
}



/* Custom background opacity utility */
.bg-opacity-15 {
  --bs-bg-opacity: 0.15 !important;
}

/* ==========================================================================
   Compact / Only-Icons Sidebar Mode
   ========================================================================== */

@media (min-width: 992px) {
  /* Adjust Sidebar Width & Prevent Clipping of Hover Elements */
  body.rp-sidebar-compact #navDrawer,
  body.rp-sidebar-compact #navDrawer.offcanvas,
  body.rp-sidebar-compact #navDrawer .offcanvas-body,
  body.rp-sidebar-compact #navDrawer .list-group {
    width: 70px !important;
    overflow: visible !important;
  }

  /* Adjust Page Margins & Paddings */
  body.rp-sidebar-compact .app-container {
    padding-left: 70px !important;
    transition: padding-left var(--rp-transition-speed) var(--rp-transition-ease);
  }

  body.rp-sidebar-compact nav.navbar {
    margin-left: 70px !important;
    width: calc(100% - 70px) !important;
    transition: margin-left var(--rp-transition-speed) var(--rp-transition-ease), width var(--rp-transition-speed) var(--rp-transition-ease);
  }

  /* Hide Header labels and location titles */
  body.rp-sidebar-compact #navDrawer.offcanvas .location-drawer-name,
  body.rp-sidebar-compact #navDrawer.offcanvas #navDrawerLabel,
  body.rp-sidebar-compact #navDrawer.offcanvas .offcanvas-header .btn-close {
    display: none !important;
  }

  body.rp-sidebar-compact #navDrawer.offcanvas .drawer-header-bar {
    justify-content: center !important;
    padding: 10px 0 !important;
  }

  body.rp-sidebar-compact #navDrawer.offcanvas .drawer-location-wrapper {
    justify-content: center !important;
    flex-grow: 0 !important;
    width: 100% !important;
    margin: 0 !important;
  }

  /* Compact User Profile Button */
  body.rp-sidebar-compact #navDrawer.offcanvas .rp-drawer-profile-btn {
    padding: 10px 0 !important;
    justify-content: center !important;
    display: flex !important;
  }

  body.rp-sidebar-compact #navDrawer.offcanvas .rp-drawer-profile-btn .drawer-user-details,
  body.rp-sidebar-compact #navDrawer.offcanvas .rp-drawer-profile-btn .edit-icon {
    display: none !important;
  }

  body.rp-sidebar-compact #navDrawer.offcanvas .drawer-avatar,
  body.rp-sidebar-compact #navDrawer.offcanvas .drawer-avatar-initials {
    margin: 0 !important;
  }

  /* Center Menu Icons & Hide text labels */
  body.rp-sidebar-compact #navDrawer.offcanvas .list-group-item {
    padding: 8px 0 !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center;
  }

  body.rp-sidebar-compact #navDrawer.offcanvas .list-group-item span:not(.material-symbols-outlined) {
    display: none !important;
  }

  body.rp-sidebar-compact #navDrawer.offcanvas .list-group-item .material-symbols-outlined {
    margin: 0 !important;
  }

  /* Center Menu Group Headers & Hide Text/Chevrons */
  body.rp-sidebar-compact #navDrawer.offcanvas .drawer-menu-header {
    padding: 10px 0 !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center;
  }

  body.rp-sidebar-compact #navDrawer.offcanvas .drawer-menu-header span:not(.material-symbols-outlined) {
    display: none !important;
  }

  body.rp-sidebar-compact #navDrawer.offcanvas .drawer-menu-header .chevron-icon {
    display: none !important;
  }

  body.rp-sidebar-compact #navDrawer.offcanvas .drawer-menu-header .material-symbols-outlined {
    margin: 0 !important;
  }

  /* Hover tooltips for direct items */
  body.rp-sidebar-compact #navDrawer.offcanvas .list-group-item[data-title] {
    position: relative;
  }

  body.rp-sidebar-compact #navDrawer.offcanvas .list-group-item[data-title]::after {
    content: attr(data-title);
    position: absolute;
    left: 75px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--rp-bg-card, #121212);
    color: var(--rp-text-primary, #fff);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 6px;
    border: 1px solid var(--rp-border-color, rgba(255, 255, 255, 0.15));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1060;
    box-shadow: var(--rp-shadow-md, 0 5px 15px rgba(0, 0, 0, 0.4));
  }

  body.rp-sidebar-compact #navDrawer.offcanvas .list-group-item[data-title]:hover::after {
    opacity: 1;
  }

  /* Floating Popover Submenus on Hover */
  body.rp-sidebar-compact #navDrawer.offcanvas .drawer-menu-item-group {
    position: relative;
  }

  body.rp-sidebar-compact #navDrawer.offcanvas .drawer-menu-item-group .collapse {
    display: none !important;
  }

  body.rp-sidebar-compact #navDrawer.offcanvas .drawer-menu-item-group:hover .collapse {
    display: block !important;
    height: auto !important;
    position: absolute;
    left: 70px;
    top: 0;
    width: 220px;
    z-index: 1055;
    background: var(--rp-bg-card, #121212) !important;
    border: 1px solid var(--rp-border-color, rgba(255, 255, 255, 0.15)) !important;
    border-radius: 8px;
    box-shadow: var(--rp-shadow-lg, 0 10px 30px rgba(0, 0, 0, 0.6)) !important;
    padding: 8px 0;
  }

  body.rp-sidebar-compact #navDrawer.offcanvas .drawer-menu-item-group:hover .collapse::before {
    content: attr(data-group-title);
    display: block;
    padding: 6px 16px 4px;
    font-size: 11px;
    font-weight: 400;
    color: var(--rp-text-secondary, rgba(255, 255, 255, 0.4));
    text-transform: uppercase;
    border-bottom: 1px solid var(--rp-border-color, rgba(255, 255, 255, 0.1));
    margin-bottom: 6px;
  }

  body.rp-sidebar-compact #navDrawer.offcanvas .drawer-menu-item-group:hover .drawer-submenu {
    border-left: none !important;
    margin: 0 !important;
  }

  body.rp-sidebar-compact #navDrawer.offcanvas .drawer-menu-item-group:hover .drawer-submenu .list-group-item {
    padding: 8px 16px !important;
    justify-content: flex-start !important;
    display: flex !important;
  }

  body.rp-sidebar-compact #navDrawer.offcanvas .drawer-menu-item-group:hover .drawer-submenu .list-group-item span:not(.material-symbols-outlined) {
    display: inline !important;
  }

  body.rp-sidebar-compact #navDrawer.offcanvas .drawer-menu-item-group:hover .drawer-submenu .list-group-item .material-symbols-outlined {
    margin-right: 12px !important;
  }
}

/* Ensure no bold fonts are used inside the drawer navigation */
#navDrawer,
#navDrawer *,
.rp-drawer,
.rp-drawer * {
  font-weight: 400 !important;
}

/* Dark themed drawer submenu overrides (e.g. hardcoded .bg-dark drawers) */
#navDrawer.bg-dark .drawer-submenu,
#navDrawer.bg-dark .rp-drawer-submenu,
.bg-dark .drawer-submenu,
.bg-dark .rp-drawer-submenu {
  border-left-color: rgba(255, 255, 255, 0.15) !important;
}
#navDrawer.bg-dark .drawer-submenu .list-group-item,
#navDrawer.bg-dark .rp-drawer-submenu .list-group-item,
.bg-dark .drawer-submenu .list-group-item,
.bg-dark .rp-drawer-submenu .list-group-item {
  color: rgba(255, 255, 255, 0.55) !important;
}
#navDrawer.bg-dark .drawer-submenu .list-group-item:hover,
#navDrawer.bg-dark .rp-drawer-submenu .list-group-item:hover,
.bg-dark .drawer-submenu .list-group-item:hover,
.bg-dark .rp-drawer-submenu .list-group-item:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.05) !important;
}
#navDrawer.bg-dark .drawer-submenu .list-group-item.active,
#navDrawer.bg-dark .rp-drawer-submenu .list-group-item.active,
.bg-dark .drawer-submenu .list-group-item.active,
.bg-dark .rp-drawer-submenu .list-group-item.active {
  color: #ffffff !important;
  background: var(--rp-primary, #2563eb) !important;
}