/* ==========================================================================
   CRM Component Styles
   Modern card-based CRM interface components
   ========================================================================== */

/* CRM Card - Enhanced card styling for client cards */
.crm-card {
  background: rgb(255 255 255 / 0.98);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1.5px solid rgb(var(--color-primary-rgb) / 0.15);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgb(0 0 0 / 0.08),
              0 2px 8px rgb(var(--color-primary-rgb) / 0.05),
              0 0 0 1px rgb(255 255 255 / 0.8) inset;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.crm-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    rgb(var(--color-primary-rgb)) 0%, 
    rgb(var(--color-secondary-rgb)) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.crm-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.12),
              0 6px 16px rgb(var(--color-primary-rgb) / 0.1),
              0 0 0 1px rgb(255 255 255 / 0.9) inset;
  border-color: rgb(var(--color-primary-rgb) / 0.25);
}

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

[data-theme="dark"] .crm-card {
  background: rgb(var(--color-neutral-900-rgb) / 0.85);
  border-color: rgb(var(--color-neutral-400-rgb) / 0.2);
  box-shadow: 0 4px 20px rgb(0 0 0 / 0.4),
              0 2px 8px rgb(0 0 0 / 0.3),
              0 0 0 1px rgb(255 255 255 / 0.05) inset;
}

[data-theme="dark"] .crm-card:hover {
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.6),
              0 6px 16px rgb(var(--color-primary-rgb) / 0.2),
              0 0 0 1px rgb(255 255 255 / 0.08) inset;
  border-color: rgb(var(--color-primary-rgb) / 0.35);
}

/* CRM Card Clickable */
.crm-card--clickable {
  cursor: pointer;
}

.crm-card--clickable:active {
  transform: translateY(-2px);
}

/* CRM Stat Card - For dashboard statistics */
.crm-stat-card {
  background: linear-gradient(135deg, 
    rgb(var(--color-primary-rgb) / 0.05) 0%, 
    rgb(var(--color-secondary-rgb) / 0.05) 100%);
  border: 1.5px solid rgb(var(--color-primary-rgb) / 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.crm-stat-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, 
    rgb(var(--color-primary-rgb) / 0.1) 0%, 
    transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.crm-stat-card:hover {
  border-color: rgb(var(--color-primary-rgb) / 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgb(var(--color-primary-rgb) / 0.15);
}

.crm-stat-card:hover::after {
  opacity: 1;
}

[data-theme="dark"] .crm-stat-card {
  background: linear-gradient(135deg, 
    rgb(var(--color-primary-rgb) / 0.08) 0%, 
    rgb(var(--color-secondary-rgb) / 0.08) 100%);
  border-color: rgb(var(--color-primary-rgb) / 0.3);
}

[data-theme="dark"] .crm-stat-card:hover {
  border-color: rgb(var(--color-primary-rgb) / 0.5);
  box-shadow: 0 8px 24px rgb(var(--color-primary-rgb) / 0.25);
}

/* CRM Stat Number */
.crm-stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, 
    rgb(var(--color-primary-rgb)), 
    rgb(var(--color-secondary-rgb)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .crm-stat-number {
  background: linear-gradient(135deg, 
    rgb(var(--color-primary-rgb) / 0.9), 
    rgb(var(--color-secondary-rgb) / 0.9));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.crm-stat-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(var(--color-neutral-600-rgb));
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

[data-theme="dark"] .crm-stat-label {
  color: rgb(var(--color-neutral-400-rgb));
}

/* CRM Badge - Status and category badges */
.crm-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.crm-badge--status {
  background: rgb(var(--color-primary-rgb) / 0.1);
  color: rgb(var(--color-primary-rgb));
  border: 1px solid rgb(var(--color-primary-rgb) / 0.2);
}

.crm-badge--success {
  background: rgb(34 197 94 / 0.1);
  color: rgb(22 163 74);
  border: 1px solid rgb(34 197 94 / 0.2);
}

.crm-badge--warning {
  background: rgb(251 146 60 / 0.1);
  color: rgb(234 88 12);
  border: 1px solid rgb(251 146 60 / 0.2);
}

.crm-badge--error {
  background: rgb(239 68 68 / 0.1);
  color: rgb(220 38 38);
  border: 1px solid rgb(239 68 68 / 0.2);
}

.crm-badge--info {
  background: rgb(59 130 246 / 0.1);
  color: rgb(37 99 235);
  border: 1px solid rgb(59 130 246 / 0.2);
}

.crm-badge--neutral {
  background: rgb(var(--color-neutral-500-rgb) / 0.1);
  color: rgb(var(--color-neutral-700-rgb));
  border: 1px solid rgb(var(--color-neutral-500-rgb) / 0.2);
}

[data-theme="dark"] .crm-badge--status {
  background: rgb(var(--color-primary-rgb) / 0.15);
  color: rgb(var(--color-primary-rgb) / 0.95);
  border-color: rgb(var(--color-primary-rgb) / 0.3);
}

[data-theme="dark"] .crm-badge--success {
  background: rgb(34 197 94 / 0.15);
  color: rgb(134 239 172);
  border-color: rgb(34 197 94 / 0.3);
}

[data-theme="dark"] .crm-badge--warning {
  background: rgb(251 146 60 / 0.15);
  color: rgb(253 186 116);
  border-color: rgb(251 146 60 / 0.3);
}

[data-theme="dark"] .crm-badge--error {
  background: rgb(239 68 68 / 0.15);
  color: rgb(252 165 165);
  border-color: rgb(239 68 68 / 0.3);
}

[data-theme="dark"] .crm-badge--info {
  background: rgb(59 130 246 / 0.15);
  color: rgb(147 197 253);
  border-color: rgb(59 130 246 / 0.3);
}

[data-theme="dark"] .crm-badge--neutral {
  background: rgb(var(--color-neutral-500-rgb) / 0.15);
  color: rgb(var(--color-neutral-300-rgb));
  border-color: rgb(var(--color-neutral-500-rgb) / 0.3);
}

/* CRM Avatar - Client avatar/initials */
.crm-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: linear-gradient(135deg, 
    rgb(var(--color-primary-rgb)), 
    rgb(var(--color-secondary-rgb)));
  color: white;
  font-weight: 600;
  font-size: 1.125rem;
  border: 2px solid rgb(255 255 255 / 0.9);
  box-shadow: 0 4px 12px rgb(var(--color-primary-rgb) / 0.3);
  transition: all 0.3s ease;
}

.crm-avatar--sm {
  width: 2rem;
  height: 2rem;
  font-size: 0.875rem;
}

.crm-avatar--lg {
  width: 4rem;
  height: 4rem;
  font-size: 1.5rem;
}

.crm-avatar--xl {
  width: 5rem;
  height: 5rem;
  font-size: 2rem;
}

.crm-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgb(var(--color-primary-rgb) / 0.4);
}

[data-theme="dark"] .crm-avatar {
  border-color: rgb(var(--color-neutral-800-rgb));
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.5);
}

[data-theme="dark"] .crm-avatar:hover {
  box-shadow: 0 6px 16px rgb(var(--color-primary-rgb) / 0.5);
}

/* CRM Quick Action Buttons */
.crm-quick-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  background: rgb(var(--color-primary-rgb) / 0.1);
  color: rgb(var(--color-primary-rgb));
  border: 1px solid rgb(var(--color-primary-rgb) / 0.2);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  white-space: nowrap;
}

.crm-quick-action:hover {
  background: rgb(var(--color-primary-rgb));
  color: white;
  border-color: rgb(var(--color-primary-rgb));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgb(var(--color-primary-rgb) / 0.3);
}

.crm-quick-action:active {
  transform: translateY(0);
}

.crm-quick-action--secondary {
  background: rgb(var(--color-neutral-500-rgb) / 0.1);
  color: rgb(var(--color-neutral-700-rgb));
  border-color: rgb(var(--color-neutral-500-rgb) / 0.2);
}

.crm-quick-action--secondary:hover {
  background: rgb(var(--color-neutral-600-rgb));
  color: white;
  border-color: rgb(var(--color-neutral-600-rgb));
}

.crm-quick-action--success {
  background: rgb(34 197 94 / 0.1);
  color: rgb(22 163 74);
  border-color: rgb(34 197 94 / 0.2);
}

.crm-quick-action--success:hover {
  background: rgb(22 163 74);
  color: white;
  border-color: rgb(22 163 74);
}

[data-theme="dark"] .crm-quick-action {
  background: rgb(var(--color-primary-rgb) / 0.15);
  color: rgb(var(--color-primary-rgb) / 0.95);
  border-color: rgb(var(--color-primary-rgb) / 0.3);
}

[data-theme="dark"] .crm-quick-action:hover {
  background: rgb(var(--color-primary-rgb) / 0.9);
  color: white;
  border-color: rgb(var(--color-primary-rgb) / 0.9);
}

[data-theme="dark"] .crm-quick-action--secondary {
  background: rgb(var(--color-neutral-500-rgb) / 0.15);
  color: rgb(var(--color-neutral-300-rgb));
  border-color: rgb(var(--color-neutral-500-rgb) / 0.3);
}

[data-theme="dark"] .crm-quick-action--secondary:hover {
  background: rgb(var(--color-neutral-500-rgb));
  color: white;
  border-color: rgb(var(--color-neutral-500-rgb));
}

/* CRM Grid Layout */
.crm-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .crm-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .crm-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .crm-grid--4col {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* CRM Client Card Content Layout */
.crm-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.crm-card-body {
  margin-bottom: 1rem;
}

.crm-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgb(var(--color-neutral-200-rgb));
}

[data-theme="dark"] .crm-card-footer {
  border-color: rgb(var(--color-neutral-700-rgb));
}

/* CRM Filter Panel */
.crm-filter-panel {
  background: rgb(255 255 255 / 0.95);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgb(var(--color-primary-rgb) / 0.15);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

[data-theme="dark"] .crm-filter-panel {
  background: rgb(var(--color-neutral-900-rgb) / 0.8);
  border-color: rgb(var(--color-neutral-400-rgb) / 0.2);
}

.crm-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.crm-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: rgb(var(--color-primary-rgb) / 0.1);
  color: rgb(var(--color-primary-rgb));
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.crm-filter-chip:hover {
  background: rgb(var(--color-primary-rgb) / 0.15);
}

.crm-filter-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: rgb(var(--color-primary-rgb) / 0.2);
  transition: background 0.2s ease;
}

.crm-filter-chip:hover .crm-filter-chip-remove {
  background: rgb(var(--color-primary-rgb) / 0.3);
}

/* CRM Info Row */
.crm-info-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgb(var(--color-neutral-600-rgb));
  margin-bottom: 0.5rem;
}

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

[data-theme="dark"] .crm-info-row {
  color: rgb(var(--color-neutral-400-rgb));
}

.crm-info-icon {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  color: rgb(var(--color-primary-rgb));
}

/* CRM View Toggle */
.crm-view-toggle {
  display: inline-flex;
  background: rgb(var(--color-neutral-100-rgb));
  border-radius: 8px;
  padding: 0.25rem;
  gap: 0.25rem;
}

[data-theme="dark"] .crm-view-toggle {
  background: rgb(var(--color-neutral-800-rgb));
}

.crm-view-toggle-btn {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(var(--color-neutral-600-rgb));
  transition: all 0.2s ease;
  cursor: pointer;
  background: transparent;
  border: none;
}

.crm-view-toggle-btn:hover {
  color: rgb(var(--color-neutral-900-rgb));
}

.crm-view-toggle-btn.active {
  background: white;
  color: rgb(var(--color-primary-rgb));
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.1);
}

[data-theme="dark"] .crm-view-toggle-btn {
  color: rgb(var(--color-neutral-400-rgb));
}

[data-theme="dark"] .crm-view-toggle-btn:hover {
  color: rgb(var(--color-neutral-200-rgb));
}

[data-theme="dark"] .crm-view-toggle-btn.active {
  background: rgb(var(--color-neutral-700-rgb));
  color: rgb(var(--color-primary-rgb));
}

/* CRM Empty State */
.crm-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: rgb(var(--color-neutral-500-rgb));
}

[data-theme="dark"] .crm-empty-state {
  color: rgb(var(--color-neutral-400-rgb));
}

.crm-empty-state-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  opacity: 0.5;
}

.crm-empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: rgb(var(--color-neutral-700-rgb));
}

[data-theme="dark"] .crm-empty-state-title {
  color: rgb(var(--color-neutral-300-rgb));
}

/* Responsive Utilities for CRM */
@media (max-width: 639px) {
  .crm-card {
    padding: 1rem;
  }
  
  .crm-stat-card {
    padding: 1rem;
  }
  
  .crm-stat-number {
    font-size: 2rem;
  }
  
  .crm-card-footer {
    flex-direction: column;
    align-items: stretch;
  }
  
  .crm-quick-action {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   Glass Utility Classes
   ========================================================================== */

/* ========================================
   Base Glass Card Component
   ======================================== */
/* Main glass card - elegant glassmorphism with subtle blur and soft glows */
.glass-card {
  background: rgb(255 255 255 / 0.7);
  backdrop-filter: blur(var(--blur-md)) saturate(var(--backdrop-saturate));
  border: 1px solid rgb(255 255 255 / 0.4);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-glass);
  position: relative;
  will-change: backdrop-filter, transform;
  transition-property: background-color, border-color, box-shadow, transform;
  transition-duration: var(--animation-duration-base);
  transition-timing-function: var(--animation-easing);
  overflow: visible;
}

/* Dark theme glass card */
[data-theme="dark"] .glass-card {
  background: rgb(var(--color-neutral-900-rgb) / 0.6);
  border-color: rgb(var(--color-neutral-400-rgb) / 0.2);
  box-shadow: var(--shadow-glass);
}

/* Light background variant (explicit light theme) */
.glass-card[data-bg="light"] {
  background: rgb(255 255 255 / 0.95);
  border: 1.5px solid rgb(var(--color-primary-rgb) / 0.25);
  box-shadow: 0 10px 40px rgb(var(--color-primary-rgb) / 0.15),
              0 6px 20px rgb(0 0 0 / 0.1),
              0 2px 8px rgb(var(--color-secondary-rgb) / 0.1),
              0 0 0 1px rgb(255 255 255 / 0.4) inset,
              0 1px 0 rgb(255 255 255 / 0.6) inset,
              0 -1px 0 rgb(0 0 0 / 0.05) inset;
}

[data-theme="dark"] .glass-card[data-bg="light"] {
  background: rgb(var(--color-neutral-900-rgb) / 0.7);
  border-color: rgb(var(--color-neutral-400-rgb) / 0.25);
  box-shadow: 0 8px 32px rgb(0 0 0 / 0.5),
              0 4px 16px rgb(0 0 0 / 0.4),
              0 0 0 1px rgb(var(--color-neutral-400-rgb) / 0.15) inset,
              0 1px 0 rgb(255 255 255 / 0.08) inset,
              0 -1px 0 rgb(0 0 0 / 0.3) inset,
              0 0 60px rgb(var(--color-primary-rgb) / 0.1);
}

/* Dense variant - higher opacity, more blur (for charts) */
.glass-card--dense,
.chart-glass-card {
  background: rgb(255 255 255 / 0.8);
  backdrop-filter: blur(var(--blur-lg)) saturate(200%);
  border: 1px solid rgb(255 255 255 / 0.5);
  box-shadow: 0 12px 40px rgb(var(--color-primary-rgb) / 0.12),
              0 6px 20px rgb(var(--color-secondary-rgb) / 0.1),
              0 0 0 1px rgb(255 255 255 / 0.4) inset,
              0 1px 0 rgb(255 255 255 / 0.6) inset,
              0 -1px 0 rgb(255 255 255 / 0.2) inset;
  overflow: hidden;
}

[data-theme="dark"] .glass-card--dense,
[data-theme="dark"] .chart-glass-card {
  background: rgb(var(--color-neutral-900-rgb) / 0.75);
  border-color: rgb(var(--color-neutral-400-rgb) / 0.3);
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.5),
              0 6px 20px rgb(0 0 0 / 0.4),
              0 0 0 1px rgb(var(--color-neutral-400-rgb) / 0.2) inset,
              0 1px 0 rgb(255 255 255 / 0.1) inset,
              0 -1px 0 rgb(0 0 0 / 0.3) inset,
              0 0 80px rgb(var(--color-primary-rgb) / 0.12);
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(12px)) {
  .glass-card,
  .glass-card--dense,
  .chart-glass-card {
    background: rgb(255 255 255 / 0.95);
  }
  [data-theme="dark"] .glass-card,
  [data-theme="dark"] .glass-card--dense,
  [data-theme="dark"] .chart-glass-card {
    background: rgb(var(--color-neutral-900-rgb) / 0.95);
  }
}

/* ========================================
   Glass Container Utilities
   ======================================== */
/* Glass container for grouping elements */
.glass-container {
  background: rgb(255 255 255 / 0.5);
  backdrop-filter: blur(var(--blur-lg)) saturate(var(--backdrop-saturate));
  border: 1px solid rgb(255 255 255 / 0.3);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
}

[data-theme="dark"] .glass-container {
  background: rgb(var(--color-neutral-900-rgb) / 0.5);
  border-color: rgb(var(--color-neutral-400-rgb) / 0.2);
}

/* Glass badge/pill */
.glass-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  background: rgb(255 255 255 / 0.6);
  backdrop-filter: blur(var(--blur-sm)) saturate(var(--backdrop-saturate));
  border: 1px solid rgb(var(--color-primary-rgb) / 0.2);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}

[data-theme="dark"] .glass-badge {
  background: rgb(var(--color-neutral-900-rgb) / 0.6);
  border-color: rgb(var(--color-neutral-400-rgb) / 0.2);
}

/* Glass alert/notification */
.glass-alert {
  background: rgb(255 255 255 / 0.7);
  backdrop-filter: blur(var(--blur-md)) saturate(var(--backdrop-saturate));
  border: 1px solid rgb(var(--color-primary-rgb) / 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .glass-alert {
  background: rgb(var(--color-neutral-900-rgb) / 0.7);
  border-color: rgb(var(--color-neutral-400-rgb) / 0.2);
}

/* ========================================
   Shadow Utility Classes
   ======================================== */
/* Standard shadow utilities using design tokens */
.shadow-sm {
  box-shadow: var(--shadow-sm);
}

.shadow-md {
  box-shadow: var(--shadow-md);
}

.shadow-lg {
  box-shadow: var(--shadow-lg);
}

.shadow-xl {
  box-shadow: var(--shadow-xl);
}

/* Glass shadow utilities */
.shadow-glass {
  box-shadow: var(--shadow-glass);
}

.shadow-glass-lg {
  box-shadow: var(--shadow-glass-lg);
}


/* ==========================================================================
   Animations - Optimized for Performance
   ========================================================================== */

/* Hero Animations - REMOVED
   ==========================================================================
   All hero animations have been removed to prevent interference with 
   backdrop-filter rendering. Hero elements are now visible by default
   with no animation delays or transforms that could affect backdrop blur.
   ========================================================================== */

@keyframes mobileMenuLinkFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes mobileMenuLinkFadeOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
}

@keyframes mobileMenuCollapse {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
}

@keyframes mobileMenuBackdropFadeOut {
  from {
    opacity: 1;
    backdrop-filter: blur(var(--blur-sm));
  }
  to {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
}

@keyframes mobileActionItemFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes mobileActionItemFadeOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}

/* Toast Notification Animations */
@keyframes slide-in-right {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.animate-slide-in-right {
  animation: slide-in-right 0.3s ease-out;
}


/* ==========================================================================
   Scroll to Top Button
   ========================================================================== */
.scroll-to-top-btn {
  position: fixed;
  inset-block-end: 2rem;
  inset-inline-end: 2rem;
  z-index: 100;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(255 255 255 / 0.7);
  border: 1px solid rgb(255 255 255 / 0.3);
  box-shadow: 0 4px 20px rgb(0 0 0 / 0.15),
              0 2px 8px rgb(0 0 0 / 0.1),
              inset 0 1px 0 rgb(255 255 255 / 0.5);
  /* Use CSS variable for brand-aware colors */
  color: var(--color-secondary);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s 0.3s,
              background 0.3s ease,
              box-shadow 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

/* Kiss Mortgage - Use primary blue for scroll-to-top button (light mode only) */
[data-app="kiss-mortgage"]:not([data-theme="dark"]) .scroll-to-top-btn {
  color: var(--color-primary); /* #05668d */
}

.scroll-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s,
              background 0.3s ease,
              box-shadow 0.3s ease;
}

.scroll-to-top-btn:hover {
  background: rgb(255 255 255 / 0.85);
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.2),
              0 3px 10px rgb(0 0 0 / 0.15),
              inset 0 1px 0 rgb(255 255 255 / 0.6);
  transform: translateY(-2px) scale(1.05);
}

.scroll-to-top-btn:active {
  transform: translateY(0) scale(0.95);
  background: rgb(255 255 255 / 0.9);
}

.scroll-to-top-btn:focus-visible {
  /* Use CSS variable for brand-aware colors */
  outline: 2px solid rgb(var(--color-secondary-rgb) / 0.5);
  outline-offset: 2px;
}

/* Kiss Mortgage - Blue focus outline */
[data-app="kiss-mortgage"] .scroll-to-top-btn:focus-visible {
  outline: 2px solid rgb(var(--color-primary-rgb) / 0.5);
}

[data-theme="dark"] .scroll-to-top-btn {
  background: rgb(var(--color-neutral-800-rgb) / 0.95);
  border: 1.5px solid rgb(255 255 255 / 0.25);
  box-shadow: 0 4px 20px rgb(0 0 0 / 0.5),
              0 2px 8px rgb(0 0 0 / 0.4),
              0 0 0 1px rgb(255 255 255 / 0.1),
              inset 0 1px 0 rgb(255 255 255 / 0.2);
  /* Default to orange for Team Piero - brighter for better contrast */
  color: rgb(255 180 0);
}

/* Kiss Mortgage - Blue in dark mode (higher specificity with both attributes) */
body[data-app="kiss-mortgage"][data-theme="dark"] .scroll-to-top-btn,
[data-app="kiss-mortgage"][data-theme="dark"] .scroll-to-top-btn {
  color: rgb(96 165 250) !important; /* Brighter blue for dark mode - #60a5fa for better contrast */
  border-color: rgb(96 165 250 / 0.4);
  box-shadow: 0 4px 20px rgb(0 0 0 / 0.5),
              0 2px 8px rgb(0 0 0 / 0.4),
              0 0 12px rgb(96 165 250 / 0.2),
              0 0 0 1px rgb(96 165 250 / 0.15),
              inset 0 1px 0 rgb(255 255 255 / 0.2);
}

[data-theme="dark"] .scroll-to-top-btn:hover {
  background: rgb(var(--color-neutral-700-rgb) / 0.95);
  border-color: rgb(255 255 255 / 0.35);
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.6),
              0 3px 10px rgb(0 0 0 / 0.5),
              0 0 0 1px rgb(255 255 255 / 0.15),
              inset 0 1px 0 rgb(255 255 255 / 0.25);
}

/* Kiss Mortgage - Blue hover in dark mode */
body[data-app="kiss-mortgage"][data-theme="dark"] .scroll-to-top-btn:hover,
[data-app="kiss-mortgage"][data-theme="dark"] .scroll-to-top-btn:hover {
  border-color: rgb(96 165 250 / 0.6);
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.6),
              0 3px 10px rgb(0 0 0 / 0.5),
              0 0 16px rgb(96 165 250 / 0.3),
              0 0 0 1px rgb(96 165 250 / 0.25),
              inset 0 1px 0 rgb(255 255 255 / 0.25);
}

[data-theme="dark"] .scroll-to-top-btn:active {
  background: rgb(var(--color-neutral-900-rgb) / 0.95);
}

.scroll-to-top-icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  display: block;
  margin: 0;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .scroll-to-top-btn {
    inset-block-end: calc(60px + 0.75rem + 0.75rem + 0.5rem);
    inset-inline-end: calc(0.75rem + 1rem);
  }
}

@media (min-width: 768px) {
  .scroll-to-top-btn {
    inset-block-end: 2rem;
    inset-inline-end: 2rem;
  }
}

@media (max-width: 767px) and (orientation: landscape) {
  .scroll-to-top-btn {
    inset-block-end: calc(60px + 0.75rem + 0.75rem + 0.5rem);
    inset-inline-end: calc(0.75rem + 0.5rem);
  }
}

/* ==========================================================================
   Scroll Down Indicator Styles
   ========================================================================== */
.scroll-down-indicator {
  position: absolute;
  inset-block-end: 2rem;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  z-index: 30;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex !important;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  animation: scrollDownBounce 2s infinite;
  pointer-events: auto;
  visibility: visible;
  width: auto;
  height: auto;
}

/* Homepage-specific positioning - to the right of hero title */
.hero-scroll-down-indicator-wrapper {
  position: absolute;
  top: 0;
  left: 100%;
  margin-left: 1.5rem;
  z-index: 10;
  display: none; /* Hidden by default, shown on desktop */
}

/* Show on desktop only where there's space to the right */
@media (min-width: 768px) {
  .hero-scroll-down-indicator-wrapper {
    display: block;
  }
  
  .hero-scroll-down-indicator-wrapper .scroll-down-indicator {
    position: static;
    transform: none;
    inset-block-end: auto;
    inset-inline-start: auto;
    animation: scrollDownBounceVertical 2s infinite;
  }
}

/* Adjust spacing for larger screens */
@media (min-width: 1024px) {
  .hero-scroll-down-indicator-wrapper {
    margin-left: 2rem;
  }
}

@media (min-width: 1280px) {
  .hero-scroll-down-indicator-wrapper {
    margin-left: 2.5rem;
  }
}

/* Vertical bounce animation for horizontal positioning */
@keyframes scrollDownBounceVertical {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}

.scroll-down-indicator:hover {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* Homepage version hover - no horizontal transform */
.hero-scroll-down-indicator-wrapper .scroll-down-indicator:hover {
  transform: translateY(-4px);
}

.scroll-down-indicator:focus-visible {
  outline: 2px solid rgb(255 255 255 / 0.5);
  outline-offset: 4px;
  border-radius: var(--radius-full);
}

.scroll-down-indicator-arrow {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(255 255 255 / 0.1);
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.2),
              0 0 0 1px rgb(255 255 255 / 0.1) inset;
  transition-property: all;
  transition-duration: var(--animation-duration-base);
  transition-timing-function: var(--animation-easing);
}

.scroll-down-indicator:hover .scroll-down-indicator-arrow {
  background: rgb(255 255 255 / 0.15);
  border-color: rgb(255 255 255 / 0.3);
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.3),
              0 0 0 1px rgb(255 255 255 / 0.15) inset;
  transform: scale(1.1);
}

.scroll-down-indicator-icon {
  width: 24px;
  height: 24px;
  stroke: rgb(255 255 255 / 0.9);
  stroke-width: 2.5;
  fill: none;
  filter: drop-shadow(0 2px 4px rgb(0 0 0 / 0.3));
}

@keyframes scrollDownBounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-down-indicator {
    animation: none;
  }
  
  .scroll-down-indicator:hover {
    transform: translateX(-50%);
  }
  
  .hero-scroll-down-indicator-wrapper .scroll-down-indicator:hover {
    transform: none;
  }
}

@media (min-width: 768px) {
  .scroll-down-indicator:not(.hero-scroll-down-indicator-wrapper .scroll-down-indicator) {
    position: fixed;
  }
}

@media (max-width: 767px) {
  .scroll-down-indicator:not(.hero-scroll-down-indicator-wrapper .scroll-down-indicator) {
    /* Chatbot button bottom is at 5.5rem (88px) from viewport bottom */
    /* To align scroll indicator's lowest animation point with chatbot bottom: */
    /* Lowest point should be at 5.5rem (88px) */
    /* Animation moves down 10px, so static position = 88px + 10px = 98px */
    /* Convert to rem: 98px = 6.125rem, or use calc: 5.5rem + 0.625rem */
    /* Set to 5rem as requested */
    inset-block-end: 5rem !important;
    z-index: 100 !important;
    position: fixed !important;
    opacity: 1 !important;
    display: flex !important;
    visibility: visible !important;
  }
  
  /* Hide indicator when mobile menu is open */
  .nav-links.mobile-menu.open ~ * .scroll-down-indicator:not(.hero-scroll-down-indicator-wrapper .scroll-down-indicator),
  body:has(.nav-links.mobile-menu.open) .scroll-down-indicator:not(.hero-scroll-down-indicator-wrapper .scroll-down-indicator) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }
  
  .scroll-down-indicator-arrow {
    width: 40px !important;
    height: 40px !important;
    background: rgb(255 255 255 / 0.1) !important;
    border: 1px solid rgb(255 255 255 / 0.2) !important;
    box-shadow: 0 4px 16px rgb(0 0 0 / 0.2),
                0 0 0 1px rgb(255 255 255 / 0.1) inset !important;
  }
  
  .scroll-down-indicator-icon {
    width: 24px !important;
    height: 24px !important;
    stroke: rgb(255 255 255 / 0.9) !important;
    stroke-width: 2.5 !important;
    filter: drop-shadow(0 2px 4px rgb(0 0 0 / 0.3)) !important;
  }
}

/* ==========================================================================
   Custom Scrollbar Styles for Sidebar
   ========================================================================== */
.sidebar-scrollbar {
  /* Webkit browsers (Chrome, Safari, Edge) */
  scrollbar-width: thin;
  scrollbar-color: rgb(203 213 225 / 0.5) transparent;
}

.sidebar-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.sidebar-scrollbar::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}

.sidebar-scrollbar::-webkit-scrollbar-thumb {
  background: rgb(203 213 225 / 0.5);
  border-radius: 10px;
  -webkit-transition: background 0.2s ease;
  transition: background 0.2s ease;
}

.sidebar-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgb(148 163 184 / 0.7);
}

/* Dark mode scrollbar */
[data-theme="dark"] .sidebar-scrollbar {
  scrollbar-color: rgb(71 85 105 / 0.6) transparent;
}

[data-theme="dark"] .sidebar-scrollbar::-webkit-scrollbar-thumb {
  background: rgb(71 85 105 / 0.6);
}

[data-theme="dark"] .sidebar-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgb(100 116 139 / 0.8);
}

/* Brand-aware scrollbar colors */
[data-app="kiss-mortgage"] .sidebar-scrollbar {
  scrollbar-color: rgb(5 102 141 / 0.4) transparent;
}

[data-app="kiss-mortgage"] .sidebar-scrollbar::-webkit-scrollbar-thumb {
  background: rgb(5 102 141 / 0.4);
}

[data-app="kiss-mortgage"] .sidebar-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgb(5 102 141 / 0.6);
}

[data-app="kiss-mortgage"][data-theme="dark"] .sidebar-scrollbar {
  scrollbar-color: rgb(96 165 250 / 0.5) transparent;
}

[data-app="kiss-mortgage"][data-theme="dark"] .sidebar-scrollbar::-webkit-scrollbar-thumb {
  background: rgb(96 165 250 / 0.5);
}

[data-app="kiss-mortgage"][data-theme="dark"] .sidebar-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgb(96 165 250 / 0.7);
}


/* ==========================================================================
   Responsive Utility Classes
   ========================================================================== */

/* ==========================================================================
   Visibility Utilities
   ========================================================================== */

/* Hide on mobile, show on tablet and above */
.hide-mobile {
  display: none;
}

@media (min-width: 768px) {
  .hide-mobile {
    display: revert;
  }
}

/* Show on mobile, hide on tablet and above */
.show-mobile {
  display: revert;
}

@media (min-width: 768px) {
  .show-mobile {
    display: none;
  }
}

/* Hide specifically on tablet sizes */
.hide-tablet {
  display: revert;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hide-tablet {
    display: none;
  }
}

/* Show only on tablet */
.show-tablet {
  display: none;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .show-tablet {
    display: revert;
  }
}

/* Hide on desktop */
.hide-desktop {
  display: revert;
}

@media (min-width: 1024px) {
  .hide-desktop {
    display: none;
  }
}

/* ==========================================================================
   Touch Target Utilities
   ========================================================================== */

/* Small touch target - 40px minimum */
.touch-target-sm {
  min-height: var(--touch-target-sm);
  min-width: var(--touch-target-sm);
}

/* Standard touch target - 44px (WCAG recommended) */
.touch-target {
  min-height: var(--touch-target);
  min-width: var(--touch-target);
}

/* Large touch target - 48px */
.touch-target-lg {
  min-height: var(--touch-target-lg);
  min-width: var(--touch-target-lg);
}

/* Touch target with padding instead of min-size (for text links) */
.touch-target-padded {
  padding: var(--space-3);
}

/* ==========================================================================
   Responsive Container Utilities
   ========================================================================== */

/* Standard responsive container with fluid padding */
.container-responsive {
  width: 100%;
  max-width: var(--container-max-width, 80rem);
  margin-inline: auto;
  padding-inline: var(--container-padding-x);
}

/* Narrow container variant */
.container-narrow {
  width: 100%;
  max-width: 60rem;
  margin-inline: auto;
  padding-inline: var(--container-padding-x);
}

/* Wide container variant */
.container-wide {
  width: 100%;
  max-width: 100rem;
  margin-inline: auto;
  padding-inline: var(--container-padding-x);
}

/* Full-width container with just padding */
.container-fluid {
  width: 100%;
  padding-inline: var(--container-padding-x);
}

/* ==========================================================================
   Responsive Spacing Utilities
   ========================================================================== */

/* Section spacing - scales with viewport */
.section-spacing {
  padding-block: calc(var(--space-12) * var(--space-multiplier));
}

.section-spacing-sm {
  padding-block: calc(var(--space-8) * var(--space-multiplier));
}

.section-spacing-lg {
  padding-block: calc(var(--space-16) * var(--space-multiplier));
}

/* ==========================================================================
   Responsive Grid Utilities
   ========================================================================== */

/* Responsive grid with auto-fit columns */
.grid-responsive {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: var(--grid-gap-md);
}

/* 2-column grid on tablet+ */
.grid-responsive-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap-md);
}

@media (min-width: 768px) {
  .grid-responsive-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 3-column grid on desktop */
.grid-responsive-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap-md);
}

@media (min-width: 768px) {
  .grid-responsive-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-responsive-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   Text Sizing Utilities
   ========================================================================== */

/* Fluid text sizes using the responsive scale */
.text-fluid-xs { font-size: var(--fluid-xs); }
.text-fluid-sm { font-size: var(--fluid-sm); }
.text-fluid-base { font-size: var(--fluid-base); }
.text-fluid-lg { font-size: var(--fluid-lg); }
.text-fluid-xl { font-size: var(--fluid-xl); }
.text-fluid-2xl { font-size: var(--fluid-2xl); }
.text-fluid-3xl { font-size: var(--fluid-3xl); }
.text-fluid-4xl { font-size: var(--fluid-4xl); }
.text-fluid-5xl { font-size: var(--fluid-5xl); }
.text-fluid-6xl { font-size: var(--fluid-6xl); }

/* ==========================================================================
   Aspect Ratio Utilities (for responsive media)
   ========================================================================== */

.aspect-square {
  aspect-ratio: 1 / 1;
}

.aspect-video {
  aspect-ratio: 16 / 9;
}

.aspect-4-3 {
  aspect-ratio: 4 / 3;
}

/* ==========================================================================
   Transition Utility Classes
   ========================================================================== */

/* Base transition utility - apply only where needed */
.transition-base {
  transition-property: background-color, border-color, color, box-shadow, transform, opacity;
  transition-duration: var(--duration-base);
  transition-timing-function: var(--easing-base);
}

.transition-slow {
  transition-property: background-color, border-color, color, box-shadow, transform, opacity;
  transition-duration: var(--duration-slow);
  transition-timing-function: var(--easing-base);
}

/* Theme-aware transitions (for theme switching) */
.transition-theme {
  transition-property: background-color, border-color, color, box-shadow, background, background-image;
  transition-duration: var(--duration-slower);
  transition-timing-function: var(--easing-base);
}

/* Interactive element transitions */
.transition-interactive {
  transition-property: background-color, border-color, color, box-shadow, transform, opacity, fill, stroke;
  transition-duration: var(--duration-base);
  transition-timing-function: var(--easing-base);
}

/* SVG-specific transitions */
.transition-svg {
  transition-property: fill, stroke, stroke-width, opacity, color;
  transition-duration: var(--duration-base);
  transition-timing-function: var(--easing-base);
}

/* No transitions utility - for elements that should never transition */
.no-transition,
.no-transition *,
.no-transition *::before,
.no-transition *::after {
  transition: none;
  animation: none;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .transition-base,
  .transition-slow,
  .transition-theme,
  .transition-interactive,
  .transition-svg {
    transition: none;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}





/*# sourceMappingURL=7875bcda72eff361.css.map*/