/* Subscription and paywall modal styles */

.upgrade-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.upgrade-modal {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.upgrade-modal.modern-wide {
  max-width: 1000px;
  width: 95%;
  max-height: 90vh;
}

.upgrade-modal-header {
  padding: 30px 30px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.upgrade-modal-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  background: linear-gradient(135deg, #0f172a 0%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.close-upgrade-modal {
  background: none;
  border: none;
  font-size: 24px;
  color: #64748b;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  border-radius: 50%;
  transition: all 0.2s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-upgrade-modal:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  transform: scale(1.1);
}

.close-subscription-modal {
  background: none;
  border: none;
  font-size: 24px;
  color: #64748b;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  border-radius: 50%;
  transition: all 0.2s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-subscription-modal:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  transform: scale(1.1);
}

.upgrade-modal-content {
  padding: 30px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.feature-limit-notice {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
  text-align: center;
}

.feature-limit-notice p {
  color: #1e293b;
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}

.subscription-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.subscription-plans.three-tier {
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.plan {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 25px;
  position: relative;
  transition: all 0.3s ease;
}

.plan:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.15);
  border-color: rgba(14, 165, 233, 0.4);
}

.plan.popular {
  border-color: #14b8a6;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
  position: relative;
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.plan-header {
  text-align: center;
  margin-bottom: 20px;
}

.plan-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px 0;
}

.plan-price {
  font-size: 36px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.plan-price span {
  font-size: 16px;
  font-weight: 500;
  color: #64748b;
}

.plan-savings {
  font-size: 14px;
  color: #059669;
  font-weight: 600;
  margin-top: 4px;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 25px 0;
}

.plan-features li {
  padding: 8px 0;
  font-size: 14px;
  color: #475569;
  display: flex;
  align-items: center;
}

.plan-features li:before {
  content: "✅";
  margin-right: 10px;
  font-size: 16px;
}

.upgrade-btn {
  width: 100%;
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.upgrade-btn.monthly {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.upgrade-btn.monthly:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

.upgrade-btn.yearly {
  background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.3);
}

.upgrade-btn.yearly:hover {
  background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
  transform: translateY(-2px);
}

.upgrade-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .subscription-plans {
    grid-template-columns: 1fr;
  }
  
  .upgrade-modal {
    margin: 10px;
    max-width: calc(100% - 20px);
  }
  
  .upgrade-modal-header {
    padding: 20px 20px 15px;
  }
  
  .upgrade-modal-content {
    padding: 20px;
  }
  
  .plan {
    padding: 20px;
  }
}

/* Usage indicator styles */
.usage-indicator {
  background: linear-gradient(135deg, rgba(245, 101, 101, 0.1) 0%, rgba(248, 113, 113, 0.1) 100%);
  border: 1px solid rgba(245, 101, 101, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 10px 0;
  font-size: 14px;
  color: #dc2626;
  display: flex;
  align-items: center;
  gap: 8px;
}

.usage-indicator.warning {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
  border-color: rgba(251, 191, 36, 0.2);
  color: #d97706;
}

.usage-indicator.success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.1) 100%);
  border-color: rgba(34, 197, 94, 0.2);
  color: #16a34a;
}

/* Subscription status in menu */
.subscription-status {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.subscription-status.free {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

.subscription-status.premium {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
  color: #14b8a6;
}

/* Auto-save indicator animations */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Auto-save indicator hover effects */
#autoSaveStatusIndicator:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

#autoSaveStatusIndicator.premium-active {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(16, 185, 129, 0.2) 100%);
  border-color: rgba(34, 197, 94, 0.3);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.1);
}

#autoSaveStatusIndicator.free-tier {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
  border-color: rgba(251, 191, 36, 0.2);
}

#autoSaveStatusIndicator.free-tier:hover {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
  border-color: rgba(251, 191, 36, 0.4);
}

/* Subscription Management Modal - Inspired by membership.io */
.subscription-modal {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
}

.subscription-modal-header {
  padding: 30px 30px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.subscription-modal-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  background: linear-gradient(135deg, #0f172a 0%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subscription-modal-content {
  padding: 30px;
  overflow-y: auto;
  max-height: calc(90vh - 100px);
}

/* Billing Toggle */
.billing-toggle-container {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.billing-toggle {
  display: flex;
  background: rgba(243, 244, 246, 0.8);
  border-radius: 12px;
  padding: 4px;
  border: 1px solid rgba(209, 213, 219, 0.5);
}

.billing-option {
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 14px;
  color: #6b7280;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.billing-option.active {
  background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.savings-badge {
  background: rgba(251, 191, 36, 0.9);
  color: #92400e;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Plan Cards */
.plans-showcase, .current-plan-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.plan-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
  border-radius: 20px;
  padding: 30px;
  border: 2px solid rgba(148, 163, 184, 0.15);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.3) 0%, rgba(148, 163, 184, 0.3) 100%);
}

.plan-card.recommended::before {
  background: linear-gradient(90deg, #14b8a6 0%, #06b6d4 100%);
}

.plan-card.active-plan::before {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.12);
  border-color: rgba(20, 184, 166, 0.3);
}

.plan-card.recommended {
  border-color: #14b8a6;
  box-shadow: 0 8px 32px rgba(20, 184, 166, 0.15);
}

/* Plan Header */
.plan-header {
  text-align: center;
  margin-bottom: 30px;
}

.plan-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.plan-badge.recommended {
  background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.plan-badge.current {
  background: rgba(107, 114, 128, 0.15);
  color: #6b7280;
}

.plan-badge.active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.plan-name {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 16px 0;
}

.plan-price-large {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-bottom: 12px;
}

.currency {
  font-size: 20px;
  font-weight: 600;
  color: #6b7280;
}

.amount {
  font-size: 48px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 4px;
}

.period {
  font-size: 18px;
  font-weight: 500;
  color: #6b7280;
}

.plan-description, .next-billing {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.plan-warning {
  font-size: 14px;
  color: #d97706;
  margin: 8px 0 0 0;
  font-weight: 600;
}

/* Feature Lists */
.plan-features {
  margin-top: 30px;
}

.plan-features h4 {
  font-size: 18px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 20px 0;
  text-align: center;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  position: relative;
}

.feature-item:last-child {
  border-bottom: none;
}

.feature-item.featured {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
  margin: 8px -15px;
  padding: 12px 15px;
  border-radius: 12px;
  border: 1px solid rgba(20, 184, 166, 0.15);
}

.feature-item.limited {
  color: #d97706;
}

.feature-item.unavailable {
  color: #6b7280;
  text-decoration: line-through;
}

.feature-check, .feature-warning, .feature-cross {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  flex-shrink: 0;
}

.feature-check {
  color: #10b981;
}

.feature-warning {
  color: #f59e0b;
}

.feature-cross {
  color: #ef4444;
}

.feature-highlight {
  margin-left: auto;
  background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* CTA Button */
.plan-cta-button {
  width: 100%;
  background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 30px;
  box-shadow: 0 4px 16px rgba(20, 184, 166, 0.3);
}

.plan-cta-button:hover {
  background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.4);
}

/* Management Actions */
.subscription-management-actions {
  margin: 40px 0;
  padding: 30px;
  background: rgba(248, 250, 252, 0.5);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.action-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  flex: 1;
  min-width: 160px;
}

.action-btn .btn-icon {
  width: 16px;
  height: 16px;
}

.cancel-btn {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.cancel-btn:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-1px);
}

.resume-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.resume-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
}

.upgrade-btn {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
}

.upgrade-btn:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  transform: translateY(-1px);
}

/* Usage Analytics */
.usage-analytics {
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.8) 100%);
  border-radius: 16px;
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.usage-title {
  font-size: 20px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 24px 0;
  text-align: center;
}

.usage-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.usage-stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
}

.usage-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.stat-icon {
  font-size: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
  border-radius: 12px;
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 24px;
  color: #0f172a;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-limit {
  font-size: 12px;
  color: #d97706;
  font-weight: 500;
}

.stat-unlimited {
  font-size: 12px;
  color: #10b981;
  font-weight: 600;
}

.plan-status-card.active {
  border-color: #14b8a6;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
}

.plan-status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.plan-status-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.plan-status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan-status-badge.active {
  background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
  color: white;
}

.plan-status-badge.inactive {
  background: rgba(107, 114, 128, 0.2);
  color: #6b7280;
}

.plan-status-badge.canceled {
  background: rgba(239, 68, 68, 0.2);
  color: #dc2626;
}

.plan-price {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.plan-renewal, .plan-limits {
  font-size: 14px;
  color: #64748b;
  margin: 5px 0 0 0;
}

.plan-warning {
  font-size: 14px;
  color: #d97706;
  margin: 5px 0 0 0;
  font-weight: 500;
}

.plan-features-active, .plan-features-free {
  margin-top: 20px;
}

.plan-features-active h4, .plan-features-free h4 {
  font-size: 16px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 10px 0;
}

.plan-features-active ul, .plan-features-free ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.plan-features-active li, .plan-features-free li {
  padding: 4px 0;
  font-size: 14px;
  color: #475569;
}

.subscription-actions {
  margin-bottom: 30px;
}

.premium-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.upgrade-btn.primary {
  background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.upgrade-btn.primary:hover {
  background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
  transform: translateY(-2px);
}

.upgrade-btn.danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
}

.upgrade-btn.danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-1px);
}

.upgrade-btn.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
}

.upgrade-btn.success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
}

.upgrade-btn.secondary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
}

.upgrade-btn.secondary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  transform: translateY(-1px);
}

.usage-summary {
  background: rgba(248, 250, 252, 0.8);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.usage-summary h4 {
  font-size: 16px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 15px 0;
}

.usage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.usage-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: white;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.usage-label {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

.usage-value {
  font-size: 14px;
  color: #0f172a;
  font-weight: 600;
}

/* User dropdown styles */
#userDropdown {
  min-width: 240px;
}

#userMenuBtn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Modern 3-tier pricing styles */
.plan.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.plan.disabled .plan-cta-button {
  background: #9ca3af !important;
  cursor: not-allowed;
}

.plan-starter {
  border-color: #14b8a6;
  position: relative;
}

.plan-starter::before {
  content: 'MOST AFFORDABLE';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan-pro {
  border-color: #f59e0b;
  transform: scale(1.05);
  z-index: 2;
}

.plan-enterprise {
  border-color: #6366f1;
}

.period {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.hidden {
  display: none !important;
}

/* Billing toggle enhancements */
.billing-toggle {
  background: rgba(248, 250, 252, 0.8);
  border: 1px solid rgba(209, 213, 219, 0.3);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.billing-option {
  position: relative;
  white-space: nowrap;
}

.billing-option:hover {
  background: rgba(14, 165, 233, 0.1);
}

.billing-option.active {
  background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(20, 184, 166, 0.4);
}

/* Trial disclaimer */
.trial-disclaimer {
  text-align: center;
  margin-top: 30px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
  border-radius: 12px;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.trial-disclaimer p {
  margin: 0;
  color: #059669;
  font-size: 16px;
}

/* Auth required modal styles */
.auth-required-content {
  text-align: center;
}

.trial-benefits {
  margin-bottom: 30px;
}

.trial-benefits h3 {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 20px;
}

.trial-benefits ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.trial-benefits li {
  padding: 8px 0;
  font-size: 16px;
  color: #475569;
}

.no-card-required {
  font-size: 18px;
  color: #059669;
  font-weight: 600;
  margin-top: 20px;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-btn {
  padding: 16px 32px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.auth-btn.signup-btn {
  background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(20, 184, 166, 0.3);
}

.auth-btn.signup-btn:hover {
  background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.4);
}

.auth-btn.secondary {
  background: rgba(148, 163, 184, 0.1);
  color: #475569;
  border: 2px solid rgba(148, 163, 184, 0.2);
}

.auth-btn.secondary:hover {
  background: rgba(148, 163, 184, 0.2);
  border-color: rgba(148, 163, 184, 0.4);
}

/* Trial success modal */
.trial-success-content {
  text-align: center;
}

.success-message h3 {
  font-size: 28px;
  font-weight: 700;
  color: #059669;
  margin-bottom: 20px;
}

.success-message p {
  font-size: 16px;
  color: #475569;
  margin-bottom: 15px;
}

.success-message ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  text-align: left;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.success-message li {
  padding: 8px 0;
  font-size: 16px;
  color: #475569;
}

.trial-reminder {
  font-size: 14px;
  color: #d97706;
  font-weight: 500;
  margin-top: 20px;
  padding: 12px;
  background: rgba(251, 191, 36, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.get-started-btn {
  padding: 16px 32px;
  background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 30px;
  box-shadow: 0 4px 16px rgba(20, 184, 166, 0.3);
}

.get-started-btn:hover {
  background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.4);
}

/* Tooltip styles */
.upgrade-tooltip {
  background: rgba(15, 23, 42, 0.95);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10001;
  max-width: 200px;
  text-align: center;
  line-height: 1.4;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .subscription-plans.three-tier {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .plan-pro {
    transform: none;
  }
  
  .premium-actions {
    flex-direction: column;
  }
  
  .usage-grid {
    grid-template-columns: 1fr;
  }
  
  #userDropdown {
    min-width: 220px;
    right: -20px;
  }
  
  .upgrade-modal.modern-wide {
    width: 98%;
    margin: 10px;
  }
  
  .auth-actions {
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .billing-toggle-container {
    margin-bottom: 30px;
  }
  
  .billing-option {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .savings-badge {
    font-size: 10px;
    padding: 1px 6px;
  }
}