/* ==========================================================================
   HAPYPRO UI COMPONENTS - TEAL & WARM CORAL THEME
   High-polish interactive elements, navigation, cards, drawers, & modals
   ========================================================================== */

/* --------------------------------------------------
   1. NAVIGATION & HEADER
   -------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 100;
  transition: background-color var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border-subtle);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-logo img,
.header-logo-img {
  height: 44px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
  transition: transform var(--transition-fast);
}

.brand-logo:hover img,
.brand-logo:hover .header-logo-img {
  transform: scale(1.03);
}

.brand-logo .logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, #008B97 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(0, 168, 181, 0.35);
  transition: transform var(--transition-fast);
}

.brand-logo:hover .logo-mark {
  transform: rotate(6deg) scale(1.05);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
  transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition-fast);
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Header Profile Icon Button */
.profile-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #F1F5F9;
  border: 1.5px solid var(--border-light);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
  outline: none;
  flex-shrink: 0;
}

.profile-header-btn:hover {
  background: rgba(0, 168, 181, 0.12);
  border-color: #00A8B5;
  color: #00A8B5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 168, 181, 0.18);
}

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

.profile-header-btn svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
}

/* Role Switcher Pill */
.role-switcher {
  display: flex;
  align-items: center;
  background: #EDF2F7;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px;
  position: relative;
}

.role-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.role-btn.active {
  background: #FFFFFF;
  color: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

/* --------------------------------------------------
   2. BUTTON SYSTEM
   -------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  min-height: 44px;
}

/* Primary Teal Button */
.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(0, 168, 181, 0.3);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 22px rgba(0, 168, 181, 0.45);
  transform: translateY(-2px);
  color: #FFFFFF;
}

/* Subtle Warm Coral CTA Button */
.btn-coral {
  background: var(--accent-coral);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
}

.btn-coral:hover {
  background: var(--accent-coral-hover);
  box-shadow: 0 6px 22px rgba(255, 107, 107, 0.45);
  transform: translateY(-2px);
  color: #FFFFFF;
}

.btn-cyan {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(0, 168, 181, 0.3);
}

.btn-cyan:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  color: #FFFFFF;
}

/* Secondary Clean White Button */
.btn-secondary {
  background: #FFFFFF;
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: #F8FAFC;
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  min-height: 36px;
}

.btn-lg {
  padding: 0.95rem 2rem;
  font-size: 1.05rem;
  min-height: 52px;
}

/* --------------------------------------------------
   3. HERO OMNI-SEARCH COMPONENT
   -------------------------------------------------- */
.omni-search-container {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  box-shadow: var(--shadow-lg), 0 10px 30px rgba(0, 168, 181, 0.08);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.search-field {
  flex: 1 1 240px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: #F8FAFC;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.search-field:focus-within {
  border-color: var(--primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(0, 168, 181, 0.15);
}

.search-field i,
.search-field svg {
  color: var(--primary);
  font-size: 1.15rem;
  flex-shrink: 0;
}

.search-field input,
.search-field select {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.search-field select option {
  background: #FFFFFF;
  color: #1A1A1A;
}

.search-field input::placeholder {
  color: var(--text-muted);
}

/* --------------------------------------------------
   4. JOB CARD COMPONENT (Crisp White & Off-White)
   -------------------------------------------------- */
.job-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.job-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent-coral));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.job-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg), 0 10px 25px rgba(0, 168, 181, 0.1);
}

.job-card:hover::before {
  opacity: 1;
}

.job-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.company-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.company-avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  border: 1px solid rgba(0, 168, 181, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary-dark);
  flex-shrink: 0;
}

.company-meta h4 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.job-card:hover .company-meta h4 {
  color: var(--primary);
}

.company-meta span {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.bookmark-btn {
  background: #F8FAFC;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.bookmark-btn:hover,
.bookmark-btn.saved {
  color: var(--accent-coral);
  border-color: rgba(255, 107, 107, 0.4);
  background: var(--accent-coral-light);
  transform: scale(1.1);
}

.job-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.job-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: #F1F5F9;
  border: 1px solid var(--border-subtle);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-xs);
}

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

.salary-tag {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-dark);
}

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

/* --------------------------------------------------
   5. SLIDE-OVER JOB DRAWER & MODAL
   -------------------------------------------------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.drawer-container {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 680px;
  background: #FFFFFF;
  border-left: 1px solid var(--border-subtle);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
  z-index: 201;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.drawer-container.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F8FAFC;
}

.drawer-close-btn {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.drawer-close-btn:hover {
  background: var(--accent-coral-light);
  color: var(--accent-coral);
  border-color: rgba(255, 107, 107, 0.3);
}

.drawer-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.drawer-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-subtle);
  background: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Multi-Step Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.6);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 20px 50px rgba(0, 168, 181, 0.15);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95) translateY(20px);
  transition: all var(--transition-normal);
}

.modal-backdrop.active .modal-dialog {
  transform: scale(1) translateY(0);
}

/* --------------------------------------------------
   6. TOAST NOTIFICATION SYSTEM
   -------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 500;
  transform: translateY(20px);
  opacity: 0;
  transition: all var(--transition-fast);
  max-width: 360px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.toast-success { border-left: 4px solid var(--primary); }
.toast-success .toast-icon { color: var(--primary); }

.toast-info { border-left: 4px solid var(--accent-coral); }
.toast-info .toast-icon { color: var(--accent-coral); }

/* --------------------------------------------------
   7. STATS TICKER & COUNTERS
   -------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.stat-item {
  padding: 1.5rem;
  text-align: center;
  border-radius: var(--radius-md);
  background: #FFFFFF;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
}

/* --------------------------------------------------
   8. MOBILE RESPONSIVE & HAMBURGER NAVIGATION
   -------------------------------------------------- */
.mobile-toggle {
  display: none;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-fast);
  z-index: 110;
  box-shadow: var(--shadow-sm);
  -webkit-tap-highlight-color: transparent;
}

.mobile-toggle:hover,
.mobile-toggle:focus-visible {
  background: var(--bg-primary);
  border-color: var(--primary);
  outline: none;
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, background-color 0.2s ease;
  transform-origin: center;
}

.mobile-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background-color: var(--primary);
}

.mobile-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background-color: var(--primary);
}

/* Mobile Drawer Backdrop */
.mobile-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 26, 26, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
  z-index: 95;
}

.mobile-backdrop.open {
  opacity: 1;
  visibility: visible;
}

body.menu-locked {
  overflow: hidden !important;
  touch-action: none;
}

.mobile-nav-actions {
  display: none;
}

@media (max-width: 991px) {
  .mobile-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    max-height: calc(100dvh - var(--header-height));
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem 1.75rem 2.5rem;
    gap: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
    z-index: 105;
  }

  .nav-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: all var(--transition-fast);
  }

  .nav-menu .nav-link:hover,
  .nav-menu .nav-link.active {
    background: var(--primary-light);
    color: var(--primary-dark);
  }

  .nav-menu .nav-link::after {
    display: none;
  }

  .header-actions .role-switcher {
    display: none;
  }
  
  /* Mobile actions injected inside nav menu */
  .mobile-nav-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
  }
  
  .mobile-nav-actions .role-switcher {
    display: flex;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .drawer-container {
    width: 100% !important;
    max-width: 100% !important;
  }

  .drawer-header {
    padding: 1.15rem 1.25rem;
  }

  .drawer-body {
    padding: 1.25rem;
    gap: 1.25rem;
  }

  .drawer-footer {
    padding: 1.15rem 1.25rem;
    flex-direction: column;
    gap: 0.75rem;
  }

  .drawer-footer .btn {
    width: 100%;
    justify-content: center;
  }

  .modal-dialog {
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    margin: 0.75rem auto !important;
    border-radius: 16px;
  }

  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 68px;
  }
  
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Global Button Proportions on Mobile */
  .btn {
    min-height: 44px;
    font-size: 0.92rem;
    padding: 0.65rem 1.25rem;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
  }

  .btn-lg {
    padding: 0.75rem 1.25rem !important;
    font-size: 0.95rem !important;
    min-height: 46px !important;
  }

  .btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    min-height: 38px;
  }

  /* Form Inputs (16px minimum to eliminate iOS Safari auto-zoom) */
  input, select, textarea,
  .input-field, .search-field input, .search-field select,
  .emp-input, .sales-input, .admin-input {
    font-size: 16px !important;
  }

  /* Compact Card Padding */
  .glass-panel,
  .glass-panel-luminous {
    padding: 1.5rem 1.15rem;
    border-radius: var(--radius-md);
  }

  .job-card {
    padding: 1.25rem 1rem;
  }

  .company-avatar {
    width: 44px;
    height: 44px;
    font-size: 1rem;
    border-radius: 8px;
  }

  .company-meta h4 {
    font-size: 1.05rem;
  }

  .job-card-footer {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .salary-tag {
    font-size: 0.98rem;
  }

  /* Toast Notification Bar */
  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }

  .toast {
    max-width: 100%;
    width: 100%;
  }

  /* Stats Counter Grid */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .stat-item {
    padding: 1rem 0.65rem;
  }

  .stat-number {
    font-size: clamp(1.75rem, 6vw, 2.25rem);
  }
}

@media (max-width: 520px) {
  .header-logo-img {
    height: 32px;
    max-width: 135px;
  }
  
  /* On small phones, hide header action text button since it is inside the hamburger drawer */
  .header-actions > .btn {
    display: none;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   PASSWORD TOGGLE & AUTH MODAL ENHANCEMENTS
   ========================================================================== */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-wrapper input {
  width: 100%;
  padding-right: 2.75rem !important;
}

.password-toggle-btn {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  outline: none;
  padding: 0.35rem;
  margin: 0;
  cursor: pointer;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.2s ease, transform 0.15s ease, background 0.2s ease;
  z-index: 5;
}

.password-toggle-btn:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.04);
}

.password-toggle-btn:focus-visible {
  outline: 2px solid #00A8B5;
  outline-offset: 1px;
}

.password-toggle-btn svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
  display: block;
}

/* Dark themed inputs (e.g. Sales CRM portal) */
body.dark-mode .password-toggle-btn,
.sales-auth-card .password-toggle-btn {
  color: #64748b;
}

body.dark-mode .password-toggle-btn:hover,
.sales-auth-card .password-toggle-btn:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.08);
}

/* Password Strength Indicator */
.password-strength-container {
  margin-top: 0.5rem;
  width: 100%;
}

.password-strength-bar {
  height: 4px;
  width: 100%;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
  display: flex;
  margin-bottom: 0.35rem;
}

.password-strength-fill {
  height: 100%;
  width: 0%;
  transition: width 0.3s ease, background-color 0.3s ease;
  border-radius: 9999px;
}

.password-strength-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  display: flex;
  justify-content: space-between;
}

/* Auth Dialog / Modal */
.auth-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.auth-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.auth-modal-card {
  background: #ffffff;
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 16px;
  width: 100%;
  max-width: 460px;
  padding: 2.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.auth-modal-backdrop.active .auth-modal-card {
  transform: scale(1) translateY(0);
}

.auth-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  font-size: 1.2rem;
  line-height: 1;
  transition: all 0.2s ease;
}

.auth-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* -------------------------------------------------------------
 * NOTIFICATION BELL & DROPDOWN SYSTEM
 * ------------------------------------------------------------- */
.notif-bell-btn {
  position: relative;
  background: #f8fafc;
  border: 1px solid var(--border-medium);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.notif-bell-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.notif-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
}

.notif-dropdown {
  position: absolute;
  top: 50px;
  right: 0;
  width: 360px;
  max-width: 90vw;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  z-index: 1000;
  display: none;
  overflow: hidden;
  animation: notifFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.notif-dropdown.active {
  display: block;
}

@keyframes notifFadeIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 640px) {
  .notif-dropdown {
    position: fixed !important;
    top: calc(var(--header-height, 68px) + 8px) !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
    max-height: 75vh !important;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.28) !important;
    z-index: 1050 !important;
  }
  .notif-list {
    max-height: 55vh !important;
  }
}

.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  background: #fafafa;
}

.notif-header h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.notif-header button {
  background: none;
  border: none;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

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

.notif-item {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
}

.notif-item:hover {
  background: #f8fafc;
}

.notif-item.unread {
  background: #f0fdf4;
}

.notif-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.2rem;
}

.notif-item-msg {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.4;
  margin-bottom: 0.3rem;
}

.notif-item-time {
  font-size: 0.72rem;
  color: #94a3b8;
}

.notif-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: #94a3b8;
  font-size: 0.88rem;
}

/* -------------------------------------------------------------
 * WHATSAPP STICKY SUPPORT BUTTON (USER PANELS)
 * ------------------------------------------------------------- */
.whatsapp-sticky-btn {
  position: fixed;
  bottom: max(24px, calc(20px + env(safe-area-inset-bottom)));
  right: max(24px, calc(20px + env(safe-area-inset-right)));
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff !important;
  text-decoration: none !important;
  padding: 0.7rem 1.25rem 0.7rem 0.95rem;
  border-radius: 9999px;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.42), 0 2px 6px rgba(0, 0, 0, 0.12);
  font-family: var(--font-body, system-ui, -apple-system, sans-serif);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  user-select: none;
}

.whatsapp-sticky-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.55), 0 4px 10px rgba(0, 0, 0, 0.15);
  color: #ffffff !important;
}

.whatsapp-sticky-btn:active {
  transform: translateY(0) scale(0.97);
}

.whatsapp-sticky-btn:focus-visible {
  outline: 3px solid #00A8B5;
  outline-offset: 3px;
}

.whatsapp-sticky-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  border: 2px solid rgba(37, 211, 102, 0.75);
  animation: whatsappPulseRing 2.6s infinite cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
}

@keyframes whatsappPulseRing {
  0% {
    transform: scale(0.95);
    opacity: 0.85;
  }
  70% {
    transform: scale(1.22);
    opacity: 0;
  }
  100% {
    transform: scale(1.22);
    opacity: 0;
  }
}

.whatsapp-sticky-btn svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: block;
}

.whatsapp-sticky-label {
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .whatsapp-sticky-btn {
    bottom: max(20px, calc(16px + env(safe-area-inset-bottom)));
    right: max(18px, calc(16px + env(safe-area-inset-right)));
    width: 52px;
    height: 52px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
  .whatsapp-sticky-label {
    display: none;
  }
  .whatsapp-sticky-btn svg {
    width: 28px;
    height: 28px;
  }
}


