/* Complete redesign with modern, premium aesthetic */

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

:root {
  /* Modern color palette - teal primary, warm accents, sophisticated neutrals */
  --primary: #0f766e;
  --primary-light: #14b8a6;
  --primary-dark: #0d5a52;
  --accent: #f97316;
  --accent-light: #fed7aa;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --success: #10b981;
  --error: #ef4444;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Main container with centered layout and responsive padding */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

/* Card with modern shadow and rounded corners */
.auth-card {
  background: var(--bg-primary);
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 480px;
  padding: 48px 40px;
  animation: slideUp 0.5s ease-out;
}

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

/* Header section with logo and typography */
.auth-header {
  margin-bottom: 32px;
  text-align: center;
}

.logo {
  margin-bottom: 24px;
}

.logo h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.logo span {
  color: var(--primary);
  font-weight: 700;
}

.auth-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.auth-header p {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* User type selector with modern button styling */
.user-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

.user-type-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px solid var(--border);
  background: var(--bg-secondary);
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
  font-family: inherit;
}

.user-type-btn:hover {
  border-color: var(--primary-light);
  background: var(--bg-tertiary);
  color: var(--primary);
}

.user-type-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
}

.user-type-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

/* Form styling with modern inputs */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition);
}

.form-group input::placeholder,
.form-group select::placeholder {
  color: var(--text-tertiary);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
  background: var(--bg-primary);
}

.form-group input:hover,
.form-group select:hover {
  border-color: var(--primary-light);
}

/* Conditional fields animation */
.conditional-fields {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

/* Password strength indicator */
.password-strength {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.strength-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--error), var(--accent), var(--success));
  border-radius: 2px;
  transition: width 0.3s ease;
}

.strength-text {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* Form options with custom checkbox */
.form-options {
  margin: 8px 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  background: var(--bg-primary);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: "✓";
  font-size: 12px;
  font-weight: bold;
  color: white;
}

.checkbox-label a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.checkbox-label a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* Button styling with hover effects */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.4);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-large {
  width: 100%;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  min-height: 48px;
}

.btn-google {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1.5px solid var(--border);
  width: 100%;
}

.btn-google:hover {
  background: var(--bg-tertiary);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

/* Button loader spinner */
.btn-loader {
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Divider with text */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-tertiary);
  font-size: 13px;
  font-weight: 500;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Footer with sign in link */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.auth-footer p {
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.auth-footer a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* Toast notifications */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 500;
  animation: slideInRight 0.3s ease-out;
  max-width: 320px;
}

.toast.success {
  border-left: 3px solid var(--success);
  color: var(--success);
}

.toast.error {
  border-left: 3px solid var(--error);
  color: var(--error);
}

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

/* Responsive design for mobile */
@media (max-width: 640px) {
  .auth-card {
    padding: 32px 24px;
    border-radius: 12px;
  }

  .auth-header h2 {
    font-size: 20px;
  }

  .logo h1 {
    font-size: 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .user-type-selector {
    grid-template-columns: 1fr;
  }

  .btn-large {
    padding: 12px 20px;
    font-size: 14px;
  }

  #toast-container {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 20px;
  }

  .toast {
    max-width: 100%;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --border: #334155;
    --border-light: #1e293b;
  }

  body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  }

  .form-group input,
  .form-group select {
    background: var(--bg-secondary);
  }

  .btn-google {
    background: var(--bg-secondary);
    border-color: var(--border);
  }

  .btn-google:hover {
    background: var(--bg-tertiary);
  }
}

/* Payment Section Styles - Redesigned */
.payment-section {
    margin: 2.5rem 0;
    padding: 0;
}

.payment-section h3 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
}

.payment-plan {
    display: grid;
    /* grid-template-columns: 1fr 1fr; */
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
}



.plan-card {
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.plan-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.plan-card:hover::before {
    transform: scaleX(1);
}

.plan-card.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--bg-primary) 0%, #f8fdfc 100%);
    box-shadow: var(--shadow-lg);
}

.plan-card.active::before {
    transform: scaleX(1);
    background: var(--primary);
}

.plan-card.popular {
    border-color: var(--accent);
}

.plan-card.popular::after {
    content: 'MOST POPULAR';
    position: absolute;
    top: 16px;
    right: -28px;
    background: var(--accent);
    color: white;
    padding: 4px 32px;
    font-size: 0.75rem;
    font-weight: 700;
    transform: rotate(45deg);
    letter-spacing: 0.5px;
}

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

.plan-header h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.25px;
}

.plan-badge {
    background: var(--primary-light);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

.plan-price {
    text-align: right;
    font-size: large;
    font-weight: bolder;
}

.plan-card.professional {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--bg-primary) 0%, #fff8f0 100%);
}

.plan-card.professional::before {
    background: var(--accent);
}

.plan-card.professional .plan-price {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 800;
}

.plan-card.professional .plan-header h4::after {
    content: "PRO";
    background: var(--accent);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 8px;
    vertical-align: middle;
}

.plan-amount {
    font-size: 2.5rem;
    font-weight: bolder;
    color: var(--primary);
    line-height: 1;
    display: flex;
    align-items: flex-start;
    gap: 2px;
}

.plan-currency {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 4px;
}

.plan-period {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 4px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    space-y: 0.75rem;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.plan-features li::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.plan-features li.disabled {
    color: var(--text-tertiary);
}

.plan-features li.disabled::before {
    content: '×';
    background: var(--border);
}

.plan-action {
    width: 100%;
}

/* Payment Modal */
.payment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.payment-modal-content {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: 20px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease-out;
}

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

.payment-modal h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.payment-modal p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.payment-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.payment-modal-buttons .btn {
    min-width: 120px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .payment-plan {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .plan-card {
        padding: 1.5rem 1rem;
    }
    
    .plan-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .plan-price {
        text-align: left;
    }
    
    .plan-card.popular::after {
        top: 12px;
        right: -26px;
        font-size: 0.7rem;
        padding: 3px 24px;
    }
    
    .payment-modal-content {
        padding: 2rem 1.5rem;
    }
    
    .payment-modal-buttons {
        flex-direction: column;
    }
    
    .payment-modal-buttons .btn {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .payment-section h3 {
        font-size: 1.25rem;
    }
    
    .plan-header h4 {
        font-size: 1.1rem;
    }
    
    .plan-amount {
        font-size: 1.75rem;
    }
    
    .plan-features li {
        font-size: 0.85rem;
    }
}

/* Dark mode support for payment section */
@media (prefers-color-scheme: dark) {
    .plan-card {
        background: var(--bg-secondary);
        border-color: var(--border);
    }
    
    .plan-card.active {
        background: linear-gradient(135deg, var(--bg-secondary) 0%, #1a2a27 100%);
    }
    
    .payment-modal-content {
        background: var(--bg-secondary);
    }
}



