:root {
  /* Modern vibrant color palette */
  --primary: #6366F1;
  --primary-light: #818CF8;
  --primary-dark: #4F46E5;
  --secondary: #EC4899;
  --accent: #F59E0B;
  --success: #10B981;
  --info: #3B82F6;
  --warning: #F59E0B;
  --danger: #EF4444;
  --dark: #1F2937;
  --darker: #111827;
  --light: #F9FAFB;
  --lighter: #FFFFFF;
  --gray: #6B7280;
  --light-gray: #F3F4F6;
  --border: #E5E7EB;
  
  /* Enhanced Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--secondary) 0%, #DB2777 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent) 0%, #D97706 100%);
  --gradient-success: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  --gradient-warning: linear-gradient(135deg, var(--warning) 0%, #D97706 100%);
  --gradient-danger: linear-gradient(135deg, var(--danger) 0%, #DC2626 100%);
  --gradient-dark: linear-gradient(135deg, var(--dark) 0%, #000000 100%);
  
  /* Modern Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Enhanced Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 50%;
  
  /* Spacing System */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
}

/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--light);
  color: var(--dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
}

/* App Container */
.app-container {
  max-width: 100%;
  margin: 0 auto;
  background-color: var(--lighter);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.page-content {
  padding: var(--space-md);
  padding-bottom: 80px;
}

/* Enhanced Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--darker);
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.375rem;
  margin-bottom: var(--space-md);
}

/* Modern Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  background-color: var(--lighter);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--darker);
  font-weight: 700;
}

.header-actions {
  display: flex;
  gap: var(--space-sm);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light-gray);
  border: none;
  color: var(--dark);
  font-size: 1.125rem;
  transition: all 0.2s ease;
}

.icon-btn:active {
  transform: scale(0.95);
  background: var(--primary-light);
  color: white;
}

/* Enhanced Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.stat-card {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  color: white;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: none;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
}

.stat-card:active {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-card:nth-child(1) { background: var(--gradient-primary); }
.stat-card:nth-child(2) { background: var(--gradient-secondary); }
.stat-card:nth-child(3) { background: var(--gradient-success); }
.stat-card:nth-child(4) { background: var(--gradient-accent); }

.stat-icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
  opacity: 0.9;
}

.stat-info h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.stat-info p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Modern Lead Cards */
.leads-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.lead-card {
  background-color: var(--lighter);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.lead-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.lead-card:nth-child(6n+1)::before { background: var(--primary); }
.lead-card:nth-child(6n+2)::before { background: var(--secondary); }
.lead-card:nth-child(6n+3)::before { background: var(--success); }
.lead-card:nth-child(6n+4)::before { background: var(--accent); }
.lead-card:nth-child(6n+5)::before { background: var(--info); }
.lead-card:nth-child(6n+6)::before { background: var(--warning); }

.lead-card:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-md);
}

.lead-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.lead-avatar-1 { background: var(--gradient-primary); }
.lead-avatar-2 { background: var(--gradient-secondary); }
.lead-avatar-3 { background: var(--gradient-success); }
.lead-avatar-4 { background: var(--gradient-accent); }

.lead-info {
  flex: 1;
  min-width: 0;
}

.lead-info h5 {
  margin: 0 0 var(--space-xs);
  font-size: 1rem;
  color: var(--darker);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-name {
  margin: 0;
  color: var(--gray);
  font-size: 0.875rem;
  margin-bottom: var(--space-sm);
}

.payment-status {
  background: var(--light-gray);
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  margin-top: var(--space-sm);
}

.progress {
  height: 6px;
  border-radius: 3px;
  background-color: var(--border);
  margin-bottom: var(--space-xs);
  overflow: hidden;
}

.progress-bar {
  background: var(--gradient-primary);
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.payment-details {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--dark);
  font-weight: 500;
}

.lead-actions {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* Enhanced Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: var(--space-xs);
  font-family: inherit;
}

.btn:active {
  transform: scale(0.98);
}

.btn-sm {
  padding: 8px 12px;
  font-size: 0.8125rem;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:active {
  box-shadow: var(--shadow-md);
}

.btn-info {
  background: var(--info);
  color: white;
}

.btn-info:active {
  background: #2563EB;
}

/* Modern List Group */
.list-group {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--lighter);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.list-group-item {
  padding: var(--space-md);
  background-color: var(--lighter);
  border-bottom: 1px solid var(--border);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.list-group-item:first-child {
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.list-group-item:last-child {
  border-bottom: none;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

.list-group-item:active {
  background-color: var(--light-gray);
}

.lead-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.lead-name {
  font-weight: 600;
  color: var(--darker);
  font-size: 0.9375rem;
}

.lead-amount {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9375rem;
}

/* Enhanced Bottom Navigation */
.bottom-navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 100%;
  margin: 0 auto;
  background-color: var(--lighter);
  display: flex;
  justify-content: space-around;
  padding: var(--space-sm) 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--gray);
  font-size: 0.75rem;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  flex: 1;
  max-width: 80px;
  position: relative;
}

.nav-item i {
  font-size: 1.25rem;
  margin-bottom: 2px;
  transition: all 0.2s ease;
}

.nav-item.active {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.nav-item.active i {
  transform: translateY(-1px);
}

.nav-item:active {
  transform: scale(0.95);
}

/* Modern Cards */
.card {
  background-color: var(--lighter);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.card:active {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: var(--space-lg);
  background-color: var(--lighter);
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  color: var(--darker);
  font-size: 1.125rem;
}

.card-body {
  padding: var(--space-lg);
}

/* Enhanced Forms */
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  background-color: var(--lighter);
  margin-bottom: var(--space-md);
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background-color: white;
}

/* Enhanced Profile Page */
.profile-card {
  background: var(--lighter);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.profile-card:active {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.profile-header {
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  background: var(--gradient-primary);
  color: white;
  position: relative;
  text-align: center;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  border: 3px solid white;
  font-size: 2rem;
  color: white;
  font-weight: 600;
}

.profile-header h4 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.profile-header .text-muted {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9375rem;
}

.profile-details {
  padding: var(--space-lg);
}

.detail-item {
  display: flex;
  justify-content: space-between;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: 600;
  color: var(--gray);
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.detail-value {
  color: var(--darker);
  font-weight: 600;
  text-align: right;
}

.profile-actions {
  padding: 0 var(--space-lg) var(--space-lg);
}

.btn-logout {
  background: var(--gradient-secondary);
  color: white;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition: all 0.3s ease;
  border: none;
  width: 100%;
  font-size: 0.9375rem;
}

.btn-logout:active {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Enhanced Form Styles */
.form-card {
  background: var(--lighter);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.form-card:active {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.form-card .card-body {
  padding: var(--space-xl);
}

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 600;
  color: var(--darker);
  font-size: 0.9375rem;
}

/* Floating Labels */
.form-group {
  position: relative;
  margin-bottom: var(--space-lg);
}

.form-group .form-control {
  margin-bottom: 0;
}

.form-group .form-label {
  position: absolute;
  top: 12px;
  left: 16px;
  color: var(--gray);
  transition: all 0.2s ease;
  pointer-events: none;
  background: var(--lighter);
  padding: 0 var(--space-xs);
  font-weight: 500;
}

.form-group .form-control:focus + .form-label,
.form-group .form-control:not(:placeholder-shown) + .form-label {
  top: -8px;
  left: 12px;
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
}

.btn-submit {
  background: var(--gradient-primary);
  color: white;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.btn-submit:active {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Enhanced Lead Details */
.lead-details-container {
  padding: var(--space-md);
}

.lead-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.lead-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--darker);
  font-weight: 700;
}

.btn-back {
  background: var(--light-gray);
  color: var(--dark);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  transition: all 0.3s ease;
  border: none;
  font-size: 0.875rem;
}

.btn-back:active {
  background: var(--gray);
  color: white;
  transform: translateX(-2px);
}

.lead-info-card {
  background: var(--lighter);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  margin-bottom: var(--space-lg);
  overflow: hidden;
  border-left: 4px solid var(--primary);
}

.lead-info-card .card-body {
  padding: var(--space-xl);
}

.lead-info-card h4 {
  font-size: 1.375rem;
  color: var(--darker);
  margin-bottom: var(--space-md);
  font-weight: 700;
}

.lead-info-card p {
  margin-bottom: var(--space-sm);
  font-size: 0.9375rem;
  color: var(--dark);
  line-height: 1.5;
}

.lead-info-card strong {
  color: var(--darker);
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  gap: var(--space-xs);
}

.badge.bg-success {
  background: var(--gradient-success);
  color: white;
}

/* Enhanced Assignees Section */
.assignees-section {
  margin-bottom: var(--space-xl);
}

.assignees-section h5 {
  font-size: 1.25rem;
  color: var(--darker);
  margin-bottom: var(--space-lg);
  font-weight: 700;
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--border);
}

.assignee-card {
  background: var(--lighter);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--accent);
  transition: all 0.3s ease;
}

.assignee-card:active {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.assignee-card h6 {
  font-size: 1.125rem;
  color: var(--darker);
  margin-bottom: var(--space-sm);
  font-weight: 700;
}

.assignee-card p {
  margin-bottom: var(--space-md);
  color: var(--dark);
  font-size: 0.9375rem;
}

.progress {
  height: 8px;
  border-radius: 4px;
  background-color: var(--light-gray);
  margin: var(--space-md) 0;
  overflow: hidden;
}

.progress-bar {
  background: var(--gradient-primary);
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* Enhanced Payments Section */
.client-payments-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: var(--space-xl);
  border: 1px solid var(--border);
}

.client-payments-card .card-header {
  background: var(--gradient-primary);
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  padding: var(--space-lg);
  border: none;
}

.payment-summary {
  margin-bottom: var(--space-lg);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.stat-card.bg-primary {
  background: var(--gradient-primary);
}

.stat-card.bg-success {
  background: var(--gradient-success);
}

.stat-card.bg-warning {
  background: var(--gradient-accent);
}

.stat-card h6 {
  font-size: 0.875rem;
  margin: 0;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.stat-card h4 {
  font-size: 1.5rem;
  margin: var(--space-xs) 0 0;
  font-weight: 700;
  color: white;
}

/* Enhanced Payment Form */
.payment-form .form-label {
  font-weight: 600;
  color: var(--darker);
  margin-bottom: var(--space-sm);
  display: block;
  font-size: 0.9375rem;
}

.payment-form .form-control,
.payment-form .form-select {
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  width: 100%;
  margin-bottom: var(--space-md);
  transition: all 0.2s ease;
  font-size: 0.9375rem;
  background-color: var(--lighter);
}

.payment-form .form-control:focus,
.payment-form .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  outline: none;
  background-color: white;
}

.btn-add-payment {
  background: var(--gradient-success);
  color: white;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 700;
  border: none;
  transition: all 0.3s ease;
  width: 100%;
  font-size: 0.9375rem;
}

.btn-add-payment:active {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Enhanced Payments History */
.payments-list h6 {
  font-size: 1.125rem;
  color: var(--darker);
  margin-bottom: var(--space-md);
  font-weight: 700;
}

.payments-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--lighter);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.payments-table thead {
  background: var(--gradient-primary);
  color: white;
}

.payments-table th {
  padding: var(--space-md);
  text-align: left;
  font-weight: 700;
  font-size: 0.875rem;
}

.payments-table td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
  color: var(--dark);
  font-size: 0.875rem;
}

.payments-table tr:last-child td {
  border-bottom: none;
}

.payments-table tr:active {
  background-color: rgba(99, 102, 241, 0.05);
}

/* Responsive Design */
@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .header {
    padding: var(--space-md);
  }
  
  .page-content {
    padding: var(--space-md);
    padding-bottom: 80px;
  }
  
  .lead-card {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }
  
  .lead-actions {
    margin-left: 0;
    align-self: stretch;
    justify-content: space-between;
  }
  
  .payment-summary {
    grid-template-columns: 1fr;
  }
  
  .lead-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }
  
  .form-card .card-body {
    padding: var(--space-lg);
  }
  
  .profile-header {
    padding: var(--space-lg) var(--space-md) var(--space-md);
  }
  
  .profile-details,
  .profile-actions {
    padding: 0 var(--space-md) var(--space-md);
  }
}

@media (min-width: 768px) {
  .app-container {
    max-width: 768px;
    margin: 0 auto;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.05);
  }
  
  .bottom-navbar {
    max-width: 768px;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Enhanced Animations */
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes slideIn {
  from { 
    opacity: 0; 
    transform: translateX(-20px); 
  }
  to { 
    opacity: 1; 
    transform: translateX(0); 
  }
}

.lead-card, .stat-card, .card, .form-card, .profile-card {
  animation: fadeIn 0.5s ease-out forwards;
}

.list-group-item {
  animation: slideIn 0.4s ease-out forwards;
}

/* Loading States */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid var(--primary);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}