/* ==========================================================================
   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,
.footer-logo-img,
.nav-brand-img {
  height: 44px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  border-radius: 8px;
  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%;
}

.site-header .btn,
.admin-header .btn,
.sales-header .btn,
.docs-nav .btn {
  white-space: nowrap !important;
  letter-spacing: -0.01em;
  font-weight: 600;
  flex-shrink: 0;
  max-width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.header-actions .btn-sm,
.docs-nav .btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  min-height: 38px;
  line-height: 1.25;
  border-radius: var(--radius-full);
  white-space: nowrap !important;
}

/* Dual-length button labels */
.btn-text-short {
  display: none !important;
}

.btn-text-full {
  display: inline !important;
}

@media (max-width: 1100px) {
  .nav-menu {
    gap: 1.15rem;
  }

  .role-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.78rem;
  }
}

/* Tablet & Narrow Desktop Breakpoint (<= 991px) */
@media (max-width: 991px) {
  .btn-text-full {
    display: none !important;
  }

  .btn-text-short {
    display: inline !important;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .header-actions .btn-sm,
  .docs-nav .btn-sm {
    padding: 0.34rem 0.68rem;
    font-size: 0.8rem;
    min-height: 34px;
  }

  #nav-cand-name,
  #nav-emp-company,
  #sales-user-display,
  .sales-badge-tag,
  .admin-badge,
  .admin-status-badge,
  .admin-user-pill,
  .docs-badge {
    display: none !important;
  }
}

/* Standard Mobile Breakpoint (<= 520px) */
@media (max-width: 520px) {
  .header-actions {
    gap: 0.35rem;
  }

  .header-actions .btn-sm,
  .docs-nav .btn-sm {
    padding: 0.28rem 0.52rem;
    font-size: 0.76rem;
    min-height: 30px;
  }

  .header-actions .header-aux-btn {
    display: none !important;
  }

  .header-logo-img {
    height: 28px;
    max-width: 105px;
  }

  .profile-header-btn {
    width: 32px;
    height: 32px;
  }

  .profile-header-btn svg {
    width: 16px;
    height: 16px;
  }

  .notif-bell-btn {
    width: 32px;
    height: 32px;
  }

  .notif-bell-btn svg {
    width: 16px;
    height: 16px;
  }

  .mobile-toggle {
    width: 32px;
    height: 32px;
  }
}

/* Extra-Small Mobile Breakpoint (<= 380px) */
@media (max-width: 380px) {
  .header-actions {
    gap: 0.22rem;
  }

  .header-actions .btn-sm,
  .docs-nav .btn-sm {
    padding: 0.22rem 0.42rem;
    font-size: 0.72rem;
    min-height: 28px;
  }

  .header-logo-img {
    height: 25px;
    max-width: 90px;
  }
}

/* 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 (ENTERPRISE UNIFIED SPEC)
   -------------------------------------------------- */
.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;
  line-height: 1.25;
  letter-spacing: -0.01em;
  padding: 0.72rem 1.5rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 180ms cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  min-height: 44px;
  white-space: nowrap;
  user-select: none;
  text-align: center;
  vertical-align: middle;
  box-sizing: border-box;
}

.btn:active {
  transform: translateY(0) scale(0.98) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.btn:disabled,
.btn[disabled],
.btn.disabled {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  transform: none !important;
  box-shadow: none !important;
}

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

.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.28);
  border: 1px solid transparent;
}

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

/* Cyan / Teal Alias */
.btn-cyan {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(0, 168, 181, 0.28);
  border: 1px solid transparent;
}

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

/* Emerald Green Success Button */
.btn-emerald {
  background: #059669;
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.28);
  border: 1px solid transparent;
}

.btn-emerald:hover {
  background: #047857;
  box-shadow: 0 6px 22px rgba(5, 150, 105, 0.45);
  transform: translateY(-2px);
  color: #FFFFFF;
}

/* Danger / Destructive Red Button */
.btn-danger {
  background: #DC2626;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.28);
  border: 1px solid transparent;
}

.btn-danger:hover {
  background: #B91C1C;
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.42);
  transform: translateY(-2px);
  color: #FFFFFF;
}

.btn-outline-danger {
  background: transparent;
  border: 1.5px solid #FCA5A5;
  color: #DC2626;
}

.btn-outline-danger:hover {
  background: #FEF2F2;
  border-color: #DC2626;
  color: #B91C1C;
  transform: translateY(-2px);
}

/* 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);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

/* Dark Slate Button */
.btn-dark {
  background: #0F172A;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
  border: 1px solid transparent;
}

.btn-dark:hover {
  background: #1E293B;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.35);
}

/* Outline Primary */
.btn-outline-primary {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 168, 181, 0.25);
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

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

/* Sizes */
.btn-xs {
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  min-height: 30px;
}

.btn-sm {
  padding: 0.45rem 1.15rem;
  font-size: 0.85rem;
  min-height: 38px;
  font-weight: 600;
}

.btn-md {
  padding: 0.72rem 1.5rem;
  font-size: 0.95rem;
  min-height: 44px;
}

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

.btn-block,
.btn-full {
  width: 100%;
  display: flex;
}

/* --------------------------------------------------
   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 (Enterprise High-Precision)
   -------------------------------------------------- */
.job-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.15rem;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
  height: 100%;
}

.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:focus-visible,
.job-card:focus-within {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow), 0 8px 20px rgba(0, 168, 181, 0.1);
}

@media (hover: hover) {
  .job-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 12px 28px rgba(0, 168, 181, 0.12), 0 4px 10px rgba(0, 0, 0, 0.04);
  }

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

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

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

/* White background container for company icon/logo so it gets highlighted */
.company-avatar {
  width: 52px;
  height: 52px;
  min-width: 52px;
  min-height: 52px;
  border-radius: 12px;
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
  .job-card:hover .company-avatar {
    border-color: #CBD5E1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: scale(1.04);
  }
}

.company-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  border-radius: 6px;
  display: block;
}

.company-avatar-monogram {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display, inherit);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--primary);
  background: #F8FAFC;
  border-radius: 8px;
  border: 1px solid #EDF2F7;
  letter-spacing: 0.03em;
}

.company-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
}

.company-meta h4 {
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--transition-fast);
}

.company-meta h4 a.job-title-link {
  color: inherit;
  text-decoration: none;
}

.company-meta h4 a.job-title-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.company-meta .company-meta-details,
.company-meta span {
  font-size: 0.84rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.3;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
}

.company-meta .company-name {
  font-weight: 600;
  color: #334155;
}

.company-meta .company-meta-separator {
  color: #CBD5E1;
  font-weight: 400;
}

.company-meta .company-location {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-secondary);
}

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

.bookmark-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

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

.bookmark-btn.saved {
  color: var(--accent-coral);
  border-color: rgba(255, 107, 107, 0.5);
  background: var(--accent-coral-light);
}

.job-card-description {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.75em;
}

.job-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  min-height: 26px;
}

.job-tags .badge {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.22rem 0.65rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  line-height: 1.3;
}

.job-tag {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: #F8FAFC;
  border: 1px solid var(--border-subtle);
  padding: 0.22rem 0.6rem;
  border-radius: 6px;
  line-height: 1.3;
}

/* Exact Space for Package (CTC) */
.job-package-box {
  background: linear-gradient(135deg, #F0FDFA 0%, #F7FEFC 100%);
  border: 1px solid #CCFBF1;
  border-radius: 10px;
  padding: 0.52rem 0.78rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  width: 100%;
  box-sizing: border-box;
  margin-top: auto;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.job-card:hover .job-package-box {
  background: #E6FFFA;
  border-color: #99F6E4;
  box-shadow: 0 2px 8px rgba(0, 168, 181, 0.08);
}

.package-badge-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #0D9488;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.package-badge-label svg {
  color: #0D9488;
  flex-shrink: 0;
}

.salary-tag {
  font-family: var(--font-sans, inherit);
  font-variant-numeric: tabular-nums;
  font-size: clamp(0.86rem, 0.92vw, 0.95rem);
  font-weight: 800;
  color: #0F766E;
  letter-spacing: -0.015em;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: normal;
  line-height: 1.25;
  min-width: 0;
  margin-left: auto;
  text-align: right;
}

.job-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid #F1F5F9;
  gap: 0.65rem;
  width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
  /* Prevents button from overflowing outside the card */
  position: relative;
}

.job-time-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0;
}

.job-time {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-activity-cue {
  font-size: 0.74rem;
  font-weight: 600;
  color: #0F766E;
  background: #F0FDFA;
  border: 1px solid #CCFBF1;
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
}

.job-card-footer-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
  max-width: 100%;
}

.job-card-btn {
  padding: 0.42rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 8px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
  background: #F8FAFC;
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  flex-shrink: 0;
}

.job-card-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.job-card-apply-btn {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

.job-card-apply-btn:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(0, 168, 181, 0.28);
}

.job-applied-pill {
  padding: 0.42rem 0.78rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 8px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  white-space: nowrap;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #047857;
  box-sizing: border-box;
  flex-shrink: 0;
}

.job-card:hover .job-card-btn:not(.job-card-apply-btn) {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: var(--primary-light);
}

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

/* --------------------------------------------------
   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;
    gap: 0.95rem;
  }

  .company-avatar {
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 4px;
  }

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

  .job-card-description {
    font-size: 0.84rem;
    line-height: 1.5;
  }

  .job-package-box {
    width: 100%;
    padding: 0.48rem 0.72rem;
    border-radius: 8px;
  }

  .package-badge-label {
    font-size: 0.68rem;
  }

  .job-card-footer {
    padding-top: 0.75rem;
    gap: 0.5rem;
  }

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

  .job-card-btn,
  .job-applied-pill {
    min-height: 44px;
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
  }

  /* 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) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .job-card-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
  }

  .job-card-footer-right {
    margin-left: auto;
    justify-content: flex-end;
  }
}

/* ==========================================================================
   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 (LEFT SIDE)
 * ------------------------------------------------------------- */
.whatsapp-sticky-btn {
  position: fixed;
  bottom: max(24px, calc(20px + env(safe-area-inset-bottom)));
  left: max(24px, calc(20px + env(safe-area-inset-left)));
  right: auto;
  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 #25D366;
  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)));
    left: max(18px, calc(16px + env(safe-area-inset-left)));
    right: auto;
    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;
  }
}



/* -------------------------------------------------------------
 * SCROLL TO TOP / PAGE GO UP AT ONCE BUTTON
 * ------------------------------------------------------------- */
.scroll-to-top-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: 9999;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1B64DA 0%, #00A8B5 100%);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 24px rgba(27, 100, 218, 0.4), 0 2px 6px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.9);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease, background 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}

.scroll-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.scroll-to-top-btn:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 12px 30px rgba(0, 168, 181, 0.5), 0 4px 10px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #1551B5 0%, #008B97 100%);
}

.scroll-to-top-btn:active {
  transform: translateY(0) scale(0.95);
}

.scroll-to-top-btn:focus-visible {
  outline: 3px solid #00A8B5;
  outline-offset: 3px;
}

.scroll-to-top-btn svg {
  width: 22px;
  height: 22px;
  stroke: #ffffff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.scroll-to-top-btn:hover svg {
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  .scroll-to-top-btn {
    bottom: max(20px, calc(16px + env(safe-area-inset-bottom)));
    right: max(18px, calc(16px + env(safe-area-inset-right)));
    width: 44px;
    height: 44px;
  }
}

/* Pre-Payment Mandatory Policy Consent Box */
.payment-policy-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  text-align: left;
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin: 0.9rem 0 1rem;
  font-size: 0.83rem;
  line-height: 1.55;
  color: #334155;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.payment-policy-consent:hover {
  border-color: var(--primary);
  background: #F0FDFA;
}

.payment-policy-consent input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 2px;
  accent-color: #00A8B5;
  cursor: pointer;
  flex-shrink: 0;
}

.payment-policy-consent a {
  color: #007A85;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.payment-policy-consent.is-error {
  border-color: #EF4444;
  background: #FEF2F2;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
}