/* ============================================================================
   DEDUCTABLY DESIGN SYSTEM - 2025 STANDARD
   Unified design system for web and mobile
   Matches Flutter design tokens exactly
   ============================================================================ */

:root {
  /* ============================================
     COLOR PALETTE - Real Estate Inspired
     ============================================ */
  
  /* Primary: Property Green - Success, property-related actions */
  --color-property-green: #10B981;
  --color-property-green-light: #34D399;
  --color-property-green-dark: #059669;
  
  /* Secondary: Cash Gold - Money, deductions, tax savings */
  --color-cash-gold: #F59E0B;
  --color-cash-gold-light: #FBBF24;
  --color-cash-gold-dark: #D97706;
  
  /* Tertiary: Business Blue - Business trips, work-related */
  --color-business-blue: #3B82F6;
  --color-business-blue-light: #60A5FA;
  --color-business-blue-dark: #2563EB;
  
  /* Error: Warning Red - Errors, alerts, destructive actions */
  --color-warning-red: #EF4444;
  --color-warning-red-light: #F87171;
  --color-warning-red-dark: #DC2626;
  
  /* Neutral palette */
  --color-neutral-50: #FAFAFA;
  --color-neutral-100: #F5F5F5;
  --color-neutral-200: #EEEEEE;
  --color-neutral-300: #E0E0E0;
  --color-neutral-400: #BDBDBD;
  --color-neutral-500: #9E9E9E;
  --color-neutral-600: #757575;
  --color-neutral-700: #616161;
  --color-neutral-800: #424242;
  --color-neutral-900: #212121;
  
  /* Semantic color mappings */
  --color-primary: var(--color-property-green);
  --color-primary-light: var(--color-property-green-light);
  --color-primary-dark: var(--color-property-green-dark);
  
  --color-secondary: var(--color-cash-gold);
  --color-secondary-light: var(--color-cash-gold-light);
  --color-secondary-dark: var(--color-cash-gold-dark);
  
  --color-tertiary: var(--color-business-blue);
  --color-tertiary-light: var(--color-business-blue-light);
  --color-tertiary-dark: var(--color-business-blue-dark);
  
  --color-error: var(--color-warning-red);
  --color-error-light: var(--color-warning-red-light);
  --color-error-dark: var(--color-warning-red-dark);
  
  /* Background and surface colors */
  --color-background: #FFFFFF;
  --color-surface: #FFFFFF;
  --color-surface-variant: var(--color-neutral-100);
  --color-on-background: var(--color-neutral-900);
  --color-on-surface: var(--color-neutral-900);
  --color-on-surface-variant: var(--color-neutral-700);
  
  /* Outline colors */
  --color-outline: var(--color-neutral-300);
  --color-outline-variant: var(--color-neutral-200);
  
  /* ============================================
     TYPOGRAPHY
     ============================================ */
  
  /* Font families */
  --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  --font-family-display: var(--font-family-base);
  
  /* Font sizes (matching Flutter tokens) */
  --font-size-display-large: 57px;
  --font-size-display-medium: 45px;
  --font-size-display-small: 36px;
  --font-size-headline-large: 32px;
  --font-size-headline-medium: 28px;
  --font-size-headline-small: 24px;
  --font-size-title-large: 22px;
  --font-size-title-medium: 16px;
  --font-size-title-small: 14px;
  --font-size-body-large: 16px;
  --font-size-body-medium: 14px;
  --font-size-body-small: 12px;
  --font-size-label-large: 14px;
  --font-size-label-medium: 12px;
  --font-size-label-small: 11px;
  
  /* Font weights */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Line heights */
  --line-height-tight: 1.12;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* Letter spacing */
  --letter-spacing-tight: -0.25px;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.5px;
  
  /* ============================================
     SPACING - 8pt Grid System
     ============================================ */
  
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  
  /* ============================================
     BORDER RADIUS
     ============================================ */
  
  --radius-small: 8px;
  --radius-medium: 12px;
  --radius-large: 16px;
  --radius-xlarge: 24px;
  --radius-full: 9999px;
  
  /* ============================================
     ELEVATION (Shadows)
     ============================================ */
  
  --elevation-0: none;
  --elevation-1: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  --elevation-2: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
  --elevation-3: 0 6px 12px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
  --elevation-4: 0 8px 16px rgba(0, 0, 0, 0.19), 0 8px 8px rgba(0, 0, 0, 0.23);
  --elevation-5: 0 12px 24px rgba(0, 0, 0, 0.19), 0 12px 12px rgba(0, 0, 0, 0.23);
  
  /* ============================================
     ANIMATION
     ============================================ */
  
  --duration-short: 100ms;
  --duration-medium: 300ms;
  --duration-long: 500ms;
  --duration-extra-long: 800ms;
  
  --easing-emphasized: cubic-bezier(0.2, 0, 0, 1);
  --easing-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --easing-decelerated: cubic-bezier(0, 0, 0.2, 1);
  --easing-accelerated: cubic-bezier(0.4, 0, 1, 1);
  --easing-spring: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* ============================================
     ICON SIZES
     ============================================ */
  
  --icon-small: 16px;
  --icon-medium: 20px;
  --icon-large: 24px;
  --icon-xlarge: 32px;
}

/* ============================================================================
   DARK MODE SUPPORT
   ============================================================================ */

@media (prefers-color-scheme: dark) {
  :root {
    --color-background: var(--color-neutral-900);
    --color-surface: var(--color-neutral-900);
    --color-surface-variant: var(--color-neutral-800);
    --color-on-background: var(--color-neutral-50);
    --color-on-surface: var(--color-neutral-50);
    --color-on-surface-variant: var(--color-neutral-300);
    --color-outline: var(--color-neutral-700);
    --color-outline-variant: var(--color-neutral-800);
    
    --color-primary: var(--color-property-green-light);
    --color-secondary: var(--color-cash-gold-light);
    --color-tertiary: var(--color-business-blue-light);
    --color-error: var(--color-warning-red-light);
  }
}

/* ============================================================================
   LOGO STYLES
   ============================================================================ */

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-title-large);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary-dark);
  text-decoration: none;
  transition: opacity var(--duration-medium) var(--easing-standard);
}

.logo:hover {
  opacity: 0.8;
}

.logo-img {
  height: 36px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
  animation: logoEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             logoPulse 3s ease-in-out 0.8s infinite;
  filter: drop-shadow(0 2px 4px rgba(5, 150, 105, 0.2));
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* SVG logo specific styling */
.logo-img[src$=".svg"] {
  height: 36px;
  width: auto;
  max-width: 180px;
}

.logo-icon {
  font-size: 2rem;
  display: inline-block;
}

/* Creative "Alive" Logo Animations */
@keyframes logoEntrance {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(-10px);
    filter: drop-shadow(0 0 0 rgba(5, 150, 105, 0));
  }
  60% {
    transform: scale(1.05) translateY(0);
    filter: drop-shadow(0 4px 8px rgba(5, 150, 105, 0.3));
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: drop-shadow(0 2px 4px rgba(5, 150, 105, 0.2));
  }
}

@keyframes logoPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 2px 4px rgba(5, 150, 105, 0.2));
  }
  50% {
    transform: scale(1.02);
    filter: drop-shadow(0 4px 8px rgba(5, 150, 105, 0.3));
  }
}

/* Hover effect - makes logo "come alive" */
.logo:hover .logo-img {
  animation: logoEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             logoPulse 1.5s ease-in-out infinite,
             logoGlow 2s ease-in-out infinite;
  transform: scale(1.05);
}

@keyframes logoGlow {
  0%, 100% {
    filter: drop-shadow(0 2px 4px rgba(5, 150, 105, 0.2)) 
            drop-shadow(0 0 8px rgba(16, 185, 129, 0.3));
  }
  50% {
    filter: drop-shadow(0 4px 8px rgba(5, 150, 105, 0.4)) 
            drop-shadow(0 0 12px rgba(16, 185, 129, 0.5));
  }
}

/* Logo text animation */
.logo span:not(.logo-icon) {
  animation: textFadeIn 0.6s ease-out 0.3s both;
  transition: color 0.3s ease;
}

@keyframes textFadeIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.logo:hover span:not(.logo-icon) {
  color: var(--color-primary);
}

/* Logo variants */
.logo-small .logo-img {
  height: 32px;
  max-width: 160px;
}

.logo-large .logo-img {
  height: 60px;
  max-width: 300px;
}

.logo-icon-only .logo-img {
  height: 40px;
  width: 40px;
  max-width: 40px;
}

/* Dark mode logo support */
@media (prefers-color-scheme: dark) {
  .logo {
    color: var(--color-primary-light);
  }
  
  /* If you have a white/light logo version for dark mode */
  .logo-img.dark-mode-logo {
    display: none;
  }
  
  .logo-img.light-mode-logo {
    display: block;
  }
}

@media (prefers-color-scheme: light) {
  .logo-img.dark-mode-logo {
    display: block;
  }
  
  .logo-img.light-mode-logo {
    display: none;
  }
}

/* ============================================================================
   BASE STYLES
   ============================================================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-body-medium);
  line-height: var(--line-height-normal);
  color: var(--color-on-background);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================================
   TYPOGRAPHY CLASSES
   ============================================================================ */

.display-large {
  font-size: var(--font-size-display-large);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-tight);
  line-height: var(--line-height-tight);
}

.display-medium {
  font-size: var(--font-size-display-medium);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-normal);
  line-height: 1.16;
}

.display-small {
  font-size: var(--font-size-display-small);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-normal);
  line-height: 1.22;
}

.headline-large {
  font-size: var(--font-size-headline-large);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-normal);
  line-height: 1.25;
}

.headline-medium {
  font-size: var(--font-size-headline-medium);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-normal);
  line-height: 1.29;
}

.headline-small {
  font-size: var(--font-size-headline-small);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-normal);
  line-height: 1.33;
}

.title-large {
  font-size: var(--font-size-title-large);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-normal);
  line-height: 1.27;
}

.title-medium {
  font-size: var(--font-size-title-medium);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.15px;
  line-height: var(--line-height-normal);
}

.title-small {
  font-size: var(--font-size-title-small);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.1px;
  line-height: 1.43;
}

.body-large {
  font-size: var(--font-size-body-large);
  font-weight: var(--font-weight-regular);
  letter-spacing: var(--letter-spacing-wide);
  line-height: var(--line-height-normal);
}

.body-medium {
  font-size: var(--font-size-body-medium);
  font-weight: var(--font-weight-regular);
  letter-spacing: 0.25px;
  line-height: 1.43;
}

.body-small {
  font-size: var(--font-size-body-small);
  font-weight: var(--font-weight-regular);
  letter-spacing: 0.4px;
  line-height: 1.33;
}

.label-large {
  font-size: var(--font-size-label-large);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.1px;
  line-height: 1.43;
}

.label-medium {
  font-size: var(--font-size-label-medium);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-wide);
  line-height: 1.33;
}

.label-small {
  font-size: var(--font-size-label-small);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-wide);
  line-height: 1.45;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border: none;
  border-radius: var(--radius-medium);
  font-family: var(--font-family-base);
  font-size: var(--font-size-label-large);
  font-weight: var(--font-weight-semibold);
  line-height: 1.43;
  cursor: pointer;
  transition: all var(--duration-medium) var(--easing-standard);
  text-decoration: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.97);
  transition: transform var(--duration-short) var(--easing-spring);
}

/* Filled Button (Primary) */
.btn-primary,
.btn-filled {
  background-color: var(--color-primary);
  color: white;
  box-shadow: var(--elevation-2);
}

.btn-primary:hover,
.btn-filled:hover {
  background-color: var(--color-primary-dark);
  box-shadow: var(--elevation-3);
}

.btn-primary:disabled,
.btn-filled:disabled {
  background-color: var(--color-surface-variant);
  color: var(--color-on-surface-variant);
  box-shadow: var(--elevation-0);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Outlined Button */
.btn-outlined {
  background-color: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

.btn-outlined:hover {
  background-color: var(--color-primary);
  color: white;
}

.btn-outlined:disabled {
  border-color: var(--color-outline-variant);
  color: var(--color-on-surface-variant);
  cursor: not-allowed;
}

/* Text Button */
.btn-text {
  background-color: transparent;
  color: var(--color-primary);
  padding: var(--space-2) var(--space-4);
}

.btn-text:hover {
  background-color: var(--color-surface-variant);
}

.btn-text:disabled {
  color: var(--color-on-surface-variant);
  cursor: not-allowed;
}

/* Button Sizes */
.btn-small {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-label-small);
  height: 36px;
}

.btn-medium {
  padding: var(--space-3) var(--space-6);
  font-size: var(--font-size-label-large);
  height: 48px;
}

.btn-large {
  padding: var(--space-4) var(--space-8);
  font-size: 16px;
  height: 56px;
}

/* Secondary Button */
.btn-secondary {
  background-color: var(--color-secondary);
  color: white;
  box-shadow: var(--elevation-2);
}

.btn-secondary:hover {
  background-color: var(--color-secondary-dark);
  box-shadow: var(--elevation-3);
}

/* Tertiary Button */
.btn-tertiary {
  background-color: var(--color-tertiary);
  color: white;
  box-shadow: var(--elevation-2);
}

.btn-tertiary:hover {
  background-color: var(--color-tertiary-dark);
  box-shadow: var(--elevation-3);
}

/* ============================================================================
   CARDS
   ============================================================================ */

.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-large);
  box-shadow: var(--elevation-1);
  border: 1px solid var(--color-outline-variant);
  padding: var(--space-5);
  transition: all var(--duration-medium) var(--easing-standard);
}

.card:hover {
  box-shadow: var(--elevation-2);
  transform: translateY(-2px);
}

.card-elevated {
  box-shadow: var(--elevation-3);
}

.card-elevated:hover {
  box-shadow: var(--elevation-4);
}

/* ============================================================================
   INPUTS
   ============================================================================ */

.input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-outline);
  border-radius: var(--radius-medium);
  font-family: var(--font-family-base);
  font-size: var(--font-size-body-medium);
  color: var(--color-on-surface);
  background-color: var(--color-surface);
  transition: all var(--duration-medium) var(--easing-standard);
}

.input:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.input:disabled,
input:disabled,
textarea:disabled,
select:disabled {
  background-color: var(--color-surface-variant);
  color: var(--color-on-surface-variant);
  cursor: not-allowed;
  opacity: 0.6;
}

.input::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--color-on-surface-variant);
}

/* ============================================================================
   FORMS
   ============================================================================ */

.form-group {
  margin-bottom: var(--space-4);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-label-medium);
  font-weight: var(--font-weight-medium);
  color: var(--color-on-surface);
}

.form-group small {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--font-size-body-small);
  color: var(--color-on-surface-variant);
}

/* ============================================================================
   BADGES
   ============================================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-label-small);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
}

.badge-primary {
  background-color: var(--color-primary);
  color: white;
}

.badge-secondary {
  background-color: var(--color-secondary);
  color: white;
}

.badge-tertiary {
  background-color: var(--color-tertiary);
  color: white;
}

.badge-outline {
  background-color: transparent;
  border: 1px solid var(--color-outline);
  color: var(--color-on-surface);
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--color-primary);
}

.badge-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--color-secondary);
}

.badge-error {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--color-error);
}

.badge-business {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--color-tertiary);
}

.badge-personal {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--color-error);
}

/* ============================================================================
   MODALS
   ============================================================================ */

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  animation: fadeIn var(--duration-medium) var(--easing-standard);
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--color-surface);
  border-radius: var(--radius-large);
  padding: var(--space-6);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--elevation-5);
  animation: slideUp var(--duration-medium) var(--easing-spring);
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
}

.modal-close {
  background: none;
  border: none;
  font-size: var(--font-size-headline-large);
  color: var(--color-on-surface-variant);
  cursor: pointer;
  padding: var(--space-2);
  line-height: 1;
  transition: color var(--duration-medium) var(--easing-standard);
}

.modal-close:hover {
  color: var(--color-on-surface);
}

/* ============================================================================
   EMPTY STATES
   ============================================================================ */

.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-4);
  color: var(--color-on-surface-variant);
}

.empty-state-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto var(--space-6);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-primary);
  opacity: 0.1;
  border-radius: 50%;
  font-size: 64px;
  color: var(--color-primary);
}

.empty-state h3 {
  margin-bottom: var(--space-3);
  color: var(--color-on-surface);
}

.empty-state p {
  margin-bottom: var(--space-6);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================================
   TABLES
   ============================================================================ */

.table-container {
  overflow-x: auto;
  background: var(--color-surface);
  border-radius: var(--radius-large);
  box-shadow: var(--elevation-1);
  border: 1px solid var(--color-outline-variant);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--color-outline-variant);
}

th {
  background-color: var(--color-surface-variant);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-label-medium);
  color: var(--color-on-surface);
  position: sticky;
  left: 0;
  z-index: 10;
}

td {
  font-size: var(--font-size-body-medium);
  color: var(--color-on-surface);
}

tr:hover {
  background-color: var(--color-surface-variant);
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-surface-variant) 0%,
    var(--color-surface) 50%,
    var(--color-surface-variant) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer var(--duration-long) infinite;
  border-radius: var(--radius-small);
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-4);
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }

.flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: var(--space-2);
}

.gap-4 {
  gap: var(--space-4);
}

/* ============================================================================
   PHASE 3 PREMIUM: 3D EFFECTS & INTERACTIVITY
   Purposeful depth, parallax, and mouse-responsive elements
   ============================================================================ */

/* 3D Perspective Container */
.perspective-container {
  perspective: 1000px;
  perspective-origin: center center;
}

/* 3D Card Tilts - Purposeful hover feedback for interactive cards */
.feature-card,
.pricing-card,
.report-card,
.dashboard-card,
.content-card,
.stat-card,
.goal-card,
.property-card,
.activity-card,
.service-card,
.inquiry-card,
.group-card,
.goal-type-card,
.service-type-card,
.trust-card,
.step,
.mp-test-card,
.rep-status-card,
.mp-overview-card {
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
}

/* Interactive cards get 3D tilt on hover */
.feature-card:hover,
.pricing-card:hover,
.report-card:hover,
.stat-card:hover,
.goal-card:hover,
.property-card:hover,
.activity-card:hover,
.service-card:hover,
.inquiry-card:hover,
.group-card:hover,
.goal-type-card:hover,
.service-type-card:hover {
  transform: translateY(-4px) rotateX(2deg) rotateY(-1deg);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15),
              0 0 0 1px rgba(5, 150, 105, 0.1);
}

/* Dashboard cards - subtle tilt for depth */
.dashboard-card:hover,
.content-card:hover {
  transform: translateY(-2px) rotateX(1deg);
  box-shadow: var(--elevation-4);
}

/* Trust cards - gentle lift */
.trust-card:hover,
.step:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--elevation-3);
}

/* Material Participation cards - purposeful interaction */
.mp-test-card:hover,
.rep-status-card:hover,
.mp-overview-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--elevation-3);
}

/* Mouse-Responsive Parallax - Guides attention to important elements */
.parallax-element {
  transition: transform 0.1s ease-out;
  will-change: transform;
}

/* Hero section parallax */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Parallax background layers */
.parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  will-change: transform;
  transition: transform 0.1s ease-out;
}

.parallax-bg-layer-1 {
  z-index: 0;
  opacity: 0.1;
}

.parallax-bg-layer-2 {
  z-index: 1;
  opacity: 0.15;
}

/* Depth Layers - Visual hierarchy through z-index and shadows */
.depth-layer-1 {
  position: relative;
  z-index: 1;
  box-shadow: var(--elevation-1);
}

.depth-layer-2 {
  position: relative;
  z-index: 2;
  box-shadow: var(--elevation-2);
}

.depth-layer-3 {
  position: relative;
  z-index: 3;
  box-shadow: var(--elevation-3);
}

.depth-layer-4 {
  position: relative;
  z-index: 4;
  box-shadow: var(--elevation-4);
}

/* Floating effect for important cards */
.floating-card {
  animation: float 6s ease-in-out infinite;
}

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

/* 3D Button Effects - Enhanced interactivity */
.btn-3d {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn-3d:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-3d:active {
  transform: translateY(0px) scale(0.98);
}

/* Card Inner 3D Content */
.card-3d-content {
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

/* Subtle 3D text effect for headings */
.heading-3d {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1),
               0 0 20px rgba(5, 150, 105, 0.1);
  transform: translateZ(20px);
}

/* Mouse tracking for interactive elements */
.mouse-responsive {
  position: relative;
  overflow: hidden;
}

.mouse-responsive::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(5, 150, 105, 0.1) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.mouse-responsive:hover::before {
  opacity: 1;
}

/* Premium card glow on hover */
.card-glow {
  position: relative;
}

.card-glow::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(
    45deg,
    rgba(5, 150, 105, 0.1),
    rgba(16, 185, 129, 0.1),
    rgba(5, 150, 105, 0.1)
  );
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
  filter: blur(8px);
}

.card-glow:hover::after {
  opacity: 1;
}

/* Disable 3D effects on mobile for performance */
@media (max-width: 768px) {
  .feature-card,
  .pricing-card,
  .report-card,
  .dashboard-card,
  .content-card,
  .stat-card,
  .goal-card,
  .property-card,
  .activity-card,
  .service-card,
  .inquiry-card,
  .group-card,
  .goal-type-card,
  .service-type-card,
  .trust-card,
  .step,
  .mp-test-card,
  .rep-status-card,
  .mp-overview-card {
    transform: none !important;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
  }
  
  .feature-card:hover,
  .pricing-card:hover,
  .report-card:hover,
  .stat-card:hover,
  .goal-card:hover,
  .property-card:hover,
  .activity-card:hover,
  .service-card:hover,
  .inquiry-card:hover,
  .group-card:hover,
  .goal-type-card:hover,
  .service-type-card:hover,
  .dashboard-card:hover,
  .content-card:hover,
  .trust-card:hover,
  .step:hover,
  .mp-test-card:hover,
  .rep-status-card:hover,
  .mp-overview-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: var(--elevation-3);
  }
  
  .parallax-element,
  .parallax-bg {
    transform: none !important;
  }
  
  .floating-card {
    animation: none;
  }
}

/* ============================================================================
   PHASE 4 PREMIUM: MORPHING BLOBS, LIQUID MOTION, SWAYING ELEMENTS
   Organic, biomorphic motion for premium feel
   ============================================================================ */

/* Morphing Blobs - Purposeful background decoration */
.morphing-blob {
  position: absolute;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.1), rgba(16, 185, 129, 0.05));
  filter: blur(40px);
  animation: morphBlob 20s ease-in-out infinite;
  will-change: border-radius, transform;
  pointer-events: none;
  z-index: 0;
}

.morphing-blob-1 {
  width: 400px;
  height: 400px;
  top: -100px;
  left: -100px;
  animation-duration: 25s;
  animation-delay: 0s;
}

.morphing-blob-2 {
  width: 300px;
  height: 300px;
  bottom: -50px;
  right: -50px;
  animation-duration: 30s;
  animation-delay: -5s;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.05));
}

.morphing-blob-3 {
  width: 350px;
  height: 350px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 35s;
  animation-delay: -10s;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(96, 165, 250, 0.05));
}

@keyframes morphBlob {
  0%, 100% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    transform: translate(0, 0) scale(1);
  }
  25% {
    border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    transform: translate(20px, -30px) scale(1.1);
  }
  50% {
    border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
    transform: translate(-20px, 20px) scale(0.9);
  }
  75% {
    border-radius: 30% 70% 30% 70% / 70% 30% 70% 30%;
    transform: translate(30px, 10px) scale(1.05);
  }
}

/* Liquid Motion - Smooth, flowing transitions */
.liquid-motion {
  position: relative;
  overflow: hidden;
}

.liquid-motion::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(5, 150, 105, 0.1) 0%,
    transparent 70%
  );
  animation: liquidFlow 15s ease-in-out infinite;
  will-change: transform;
  pointer-events: none;
  z-index: 0;
}

.liquid-motion::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -30%;
  width: 150%;
  height: 150%;
  background: radial-gradient(
    circle,
    rgba(245, 158, 11, 0.08) 0%,
    transparent 60%
  );
  animation: liquidFlow 20s ease-in-out infinite reverse;
  will-change: transform;
  pointer-events: none;
  z-index: 0;
}

@keyframes liquidFlow {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.3;
  }
  25% {
    transform: translate(30px, -20px) rotate(90deg);
    opacity: 0.5;
  }
  50% {
    transform: translate(-20px, 30px) rotate(180deg);
    opacity: 0.4;
  }
  75% {
    transform: translate(20px, 20px) rotate(270deg);
    opacity: 0.6;
  }
}

/* Swaying Elements - Organic, natural movement */
.swaying-element {
  animation: sway 8s ease-in-out infinite;
  transform-origin: center bottom;
  will-change: transform;
}

.swaying-element-slow {
  animation: sway 12s ease-in-out infinite;
  animation-delay: -2s;
}

.swaying-element-fast {
  animation: sway 6s ease-in-out infinite;
  animation-delay: -1s;
}

@keyframes sway {
  0%, 100% {
    transform: rotate(0deg) translateY(0);
  }
  25% {
    transform: rotate(-2deg) translateY(-5px);
  }
  50% {
    transform: rotate(0deg) translateY(-10px);
  }
  75% {
    transform: rotate(2deg) translateY(-5px);
  }
}

/* Organic Gradient Background - Enhanced from Phase 1 */
.organic-gradient-bg {
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(5, 150, 105, 0.05) 0%,
    rgba(16, 185, 129, 0.03) 25%,
    rgba(245, 158, 11, 0.04) 50%,
    rgba(59, 130, 246, 0.03) 75%,
    rgba(5, 150, 105, 0.05) 100%
  );
  background-size: 400% 400%;
  animation: organicGradient 20s ease infinite;
  overflow: hidden;
}

.organic-gradient-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    ellipse at 20% 50%,
    rgba(5, 150, 105, 0.1) 0%,
    transparent 50%
  ),
  radial-gradient(
    ellipse at 80% 80%,
    rgba(245, 158, 11, 0.08) 0%,
    transparent 50%
  ),
  radial-gradient(
    ellipse at 40% 20%,
    rgba(59, 130, 246, 0.06) 0%,
    transparent 50%
  );
  animation: organicRadial 25s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes organicGradient {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes organicRadial {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.6;
  }
  33% {
    transform: scale(1.2) rotate(120deg);
    opacity: 0.8;
  }
  66% {
    transform: scale(0.9) rotate(240deg);
    opacity: 0.5;
  }
}

/* Blob Container - For section backgrounds */
.blob-container {
  position: relative;
  overflow: hidden;
  z-index: 0;
}

.blob-container > * {
  position: relative;
  z-index: 1;
}

/* Liquid Button Effect */
.btn-liquid {
  position: relative;
  overflow: hidden;
}

.btn-liquid::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-liquid:hover::before {
  width: 300px;
  height: 300px;
}

/* Swaying Icon/Logo */
.swaying-icon {
  display: inline-block;
  animation: iconSway 6s ease-in-out infinite;
  transform-origin: center center;
}

@keyframes iconSway {
  0%, 100% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(-3deg) scale(1.05);
  }
  50% {
    transform: rotate(0deg) scale(1.1);
  }
  75% {
    transform: rotate(3deg) scale(1.05);
  }
}

/* Morphing Background Pattern */
.morphing-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(5, 150, 105, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
  background-size: 200% 200%;
  animation: patternMorph 30s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes patternMorph {
  0%, 100% {
    background-position: 0% 0%, 100% 100%, 50% 50%;
    opacity: 0.6;
  }
  33% {
    background-position: 100% 0%, 0% 100%, 50% 50%;
    opacity: 0.8;
  }
  66% {
    background-position: 50% 50%, 50% 50%, 0% 0%;
    opacity: 0.5;
  }
}

/* Disable Phase 4 animations on mobile for performance */
@media (max-width: 768px) {
  .morphing-blob,
  .liquid-motion::before,
  .liquid-motion::after,
  .swaying-element,
  .swaying-element-slow,
  .swaying-element-fast,
  .organic-gradient-bg,
  .organic-gradient-bg::before,
  .swaying-icon,
  .morphing-pattern {
    animation: none !important;
    transform: none !important;
  }
  
  .morphing-blob {
    opacity: 0.3;
  }
  
  .liquid-motion::before,
  .liquid-motion::after {
    display: none;
  }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .morphing-blob,
  .liquid-motion::before,
  .liquid-motion::after,
  .swaying-element,
  .swaying-element-slow,
  .swaying-element-fast,
  .organic-gradient-bg,
  .organic-gradient-bg::before,
  .swaying-icon,
  .morphing-pattern {
    animation: none !important;
    transform: none !important;
  }
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
  .container {
    padding: var(--space-3);
  }
  
  .modal-content {
    width: 95%;
    padding: var(--space-4);
  }
  
  .btn {
    width: 100%;
  }
}
