.account-wrapper {
  min-height: auto; /* Changed from 100vh since page-wrapper handles this */
  background: transparent; /* Remove background since page-wrapper handles it */
  padding: 2rem 1rem;
}

.account-container {
  max-width: 800px;
  margin: 0 auto;
}

.account-header {
  text-align: center;
  margin-bottom: 3rem;
}

.account-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.account-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.account-section {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  border: 1px solid var(--primary-border);
  box-shadow: var(--shadow-md);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.profile-info .info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
}

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

.profile-info label {
  font-weight: 600;
  color: var(--text-secondary);
}

.profile-info span {
  color: var(--text-primary);
}

.subscription-card {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.manage-btn-badge {
  display: inline-flex;
  align-items: center;
  background: var(--primary-color);
  color: var(--text-primary);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.manage-btn-badge:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.manage-btn-badge.upgrade-btn {
  background: linear-gradient(135deg, #ffc107, #ffeb3b);
  color: #333;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.manage-btn-badge.upgrade-btn:hover {
  background: linear-gradient(135deg, #e0a800, #fdd835);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

.subscription-overview {
  margin-bottom: 2rem;
}

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

.plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.plan-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.plan-price {
  margin: 1rem 0;
}

.price-amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Free plan features styling (imported from pricing page) */
.free-plan-features {
  list-style: none;
  padding: 0;
  margin: 1rem auto;
  text-align: left;
  max-width: 300px; /* Limit width so it doesn't span full container */
  display: block;
}

.feature {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
  padding: 6px 0;
}

.feature-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 13px;
  margin-right: 12px;
  flex-shrink: 0;
  margin-top: 2px;
}

.feature-icon.check {
  background: var(--success-color);
  color: white;
}

.feature-icon.cross {
  background: var(--gray-200);
  color: var(--text-muted);
}

.feature-text {
  flex: 1;
  line-height: 1.4;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.billing-info {
  margin: 1rem 0;
  padding: 0.8rem;
  background: rgba(0, 123, 255, 0.1);
  border-radius: 8px;
  font-weight: 500;
  color: var(--text-primary);
}

.billing-info.cancel-warning {
  background: rgba(255, 193, 7, 0.1);
  border-left-color: #ffc107;
  color: #856404;
}

.status-badge {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.free {
  background: var(--border-light);
  color: var(--text-secondary);
}

.status-badge.active {
  background: var(--success-color);
  color: white;
}

.status-badge.cancelled {
  background: #dc3545;
  color: white;
}

.status-badge.inactive {
  background: #6c757d;
  color: white;
}

.usage-summary {
  border-top: 2px solid var(--border-light);
  padding-top: 1.5rem;
}

.usage-summary h4 {
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
}

.usage-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.usage-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.usage-value {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.1rem;
}

.usage-value.usage-normal {
  color: var(--success-color);
}

.usage-value.usage-warning {
  color: #ffc107;
}

.usage-value.usage-critical {
  color: #dc3545;
}

.usage-value.usage-unlimited {
  color: var(--text-primary);
}

.usage-progress {
  margin-top: 0.5rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-fill.progress-normal {
  background: var(--success-color);
}

.progress-fill.progress-warning {
  background: #ffc107;
}

.progress-fill.progress-critical {
  background: #dc3545;
}

.manage-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.manage-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.manage-btn:disabled {
  background: var(--border-light);
  cursor: not-allowed;
  transform: none;
}

.manage-description {
  margin-top: 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.loading-spinner,
.error-state {
  text-align: center;
  padding: 2rem;
}

.loading-dots {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-light);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.retry-button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 1rem;
}

.retry-button:hover {
  background: var(--primary-hover);
}

/* Subscription Management Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.subscription-modal {
  background: white;
  border-radius: 20px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 2rem 1rem 2rem;
  border-bottom: 1px solid var(--border-light);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--border-light);
  color: var(--text-primary);
}

.modal-body {
  padding: 1rem 2rem;
}

.subscription-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.option-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.8);
}

.option-item:hover {
  background: rgba(0, 123, 255, 0.05);
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
}

.option-item.option-danger:hover {
  background: rgba(220, 53, 69, 0.05);
  border-color: #dc3545;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.1);
}

.option-content {
  flex: 1;
}

.option-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.3rem 0;
}

.option-danger .option-title {
  color: #dc3545;
}

.option-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

.option-arrow {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-left: 1rem;
  transition: transform 0.2s ease;
}

.option-item:hover .option-arrow {
  transform: translateX(4px);
}

.modal-footer {
  padding: 1rem 2rem 2rem 2rem;
  border-top: 1px solid var(--border-light);
  background: rgba(0, 0, 0, 0.02);
}

.modal-footer-text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.4;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(4px);
}

.loading-content {
  text-align: center;
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.loading-spinner-large {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-light);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem auto;
}

.loading-content p {
  margin: 0;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .account-wrapper {
    padding: 1rem 0.5rem;
  }

  .account-section {
    padding: 1.5rem;
  }

  .account-title {
    font-size: 2rem;
  }

  .plan-header {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }

  .profile-info .info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Upgrade Success Message */
.upgrade-success-message {
  background: linear-gradient(135deg, var(--success-color), #4CAF50);
  color: white;
  border-radius: 16px;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(76, 175, 80, 0.3);
  animation: successSlideIn 0.5s ease-out;
}

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

.success-content {
  padding: 2rem;
  text-align: center;
}

.success-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: bounceIn 0.6s ease-out 0.2s both;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.success-content h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: white;
}

.success-content p {
  font-size: 1.1rem;
  margin: 0 0 1.5rem 0;
  opacity: 0.95;
  line-height: 1.5;
}

.close-success-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 0.75rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.close-success-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .success-content {
    padding: 1.5rem;
  }
  
  .success-icon {
    font-size: 2.5rem;
  }
  
  .success-content h3 {
    font-size: 1.5rem;
  }
  
  .success-content p {
    font-size: 1rem;
  }
}
