:root {
  --color-primary: #10b981;
  --color-primary-dark: #059669;
  --color-secondary: #243b53;
  --color-accent: #f59e0b;
  --color-background: #ffffff;
  --color-surface: #f0f4f8;
  --color-text: #102a43;
  --color-text-secondary: #486581;
  --color-border: #d9e2ec;
  --color-error: #ef4444;
  --color-success: #10b981;
  --color-warning: #f59e0b;
}

.dark {
  --color-primary: #34d399;
  --color-primary-dark: #10b981;
  --color-secondary: #d1fae5;
  --color-accent: #fbbf24;
  --color-background: #102a43;
  --color-surface: #243b53;
  --color-text: #f0f4f8;
  --color-text-secondary: #bcccdc;
  --color-border: #486581;
  --color-error: #f87171;
  --color-success: #34d399;
  --color-warning: #fbbf24;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-surface);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-secondary);
}

/* Animations */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

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

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

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

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

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

.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}

.animate-fade-out {
  animation: fadeOut 0.3s ease-out;
}

.skeleton {
  background: linear-gradient(90deg, var(--color-surface) 25%, var(--color-border) 50%, var(--color-surface) 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* Button hover effects */
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(16, 185, 129, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

/* Card effects */
.card {
  transition: all 0.3s ease;
  border: 1px solid var(--color-border);
  background: var(--color-background);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  border-color: var(--color-primary);
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-draft { background: #e5e7eb; color: #374151; }
.status-invited { background: #dbeafe; color: #1e40af; }
.status-awaiting_funding { background: #fef3c7; color: #92400e; }
.status-active { background: #d1fae5; color: #065f46; }
.status-past_due { background: #fecaca; color: #991b1b; }
.status-frozen { background: #e0e7ff; color: #3730a3; }
.status-completed { background: #d1fae5; color: #065f46; }
.status-cancelled { background: #f3f4f6; color: #6b7280; }

/* Loading spinner */
.spinner {
  border: 3px solid var(--color-surface);
  border-top: 3px solid var(--color-primary);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Progress bar */
.progress-bar {
  height: 4px;
  background: var(--color-surface);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transition: width 0.3s ease;
}

/* Form inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  background: var(--color-background);
  color: var(--color-text);
  font-size: 1rem;
  transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Utility classes */
.glass {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.dark .glass {
  background: rgba(36, 59, 83, 0.9);
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-glow {
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

/* Navigation */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  color: var(--color-text);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.nav-item:hover {
  background: var(--color-surface);
  transform: translateX(4px);
}

.nav-item.active {
  background: var(--color-primary);
  color: white;
}

.dark .nav-item.active {
  background: var(--color-primary);
  color: white;
}

/* Mobile Bottom Nav */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--color-border);
  padding: 0.5rem;
  display: flex;
  justify-content: space-around;
  z-index: 40;
}

.dark .mobile-nav {
  background: var(--color-surface);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.75rem;
  transition: all 0.2s ease;
}

.mobile-nav-item:hover {
  color: var(--color-primary);
}

.mobile-nav-item.active {
  color: var(--color-primary);
  background: var(--color-surface);
}

/* Responsive */
@media (max-width: 640px) {
  .card:hover {
    transform: none;
  }
}

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