/* ============================================
   ATLASSIAN-INSPIRED MODERN THEME
   - Professional, spacious design
   - Smooth gradients and shadows
   - Clean typography
   - Modern color palette
   ============================================ */

/* ============================================
   CSS VARIABLES - Atlassian-inspired palette
   ============================================ */
:root {
  /* Brand colors - can be overridden by JavaScript */
  --primary-color: #0052CC;
  --secondary-color: #00B8D9;
  --accent-color: #6554C0;
  
  /* UI Colors - Atlassian palette */
  --text-primary: #172B4D;
  --text-secondary: #5E6C84;
  --text-tertiary: #8993A4;
  --border-color: #DFE1E6;
  --bg-primary: #FFFFFF;
  --bg-secondary: #FAFBFC;
  --bg-tertiary: #F4F5F7;
  --bg-hover: #EBECF0;
  
  /* Status Colors */
  --success: #00875A;
  --error: #DE350B;
  --warning: #FF991F;
  --info: #0065FF;
  
  /* Shadows - Atlassian style */
  --shadow-sm: 0 1px 1px rgba(9, 30, 66, 0.25), 0 0 1px rgba(9, 30, 66, 0.31);
  --shadow-md: 0 4px 8px -2px rgba(9, 30, 66, 0.25), 0 0 1px rgba(9, 30, 66, 0.31);
  --shadow-lg: 0 8px 16px -4px rgba(9, 30, 66, 0.25), 0 0 1px rgba(9, 30, 66, 0.31);
  --shadow-xl: 0 20px 32px -8px rgba(9, 30, 66, 0.25), 0 0 1px rgba(9, 30, 66, 0.31);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #0052CC 0%, #0065FF 100%);
  --gradient-secondary: linear-gradient(135deg, #00B8D9 0%, #00C7E6 100%);
  --gradient-hero: linear-gradient(135deg, #0747A6 0%, #0052CC 50%, #0065FF 100%);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.2, 0, 0, 1);
  --transition-base: 250ms cubic-bezier(0.2, 0, 0, 1);
  --transition-slow: 350ms cubic-bezier(0.2, 0, 0, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font-family: inherit;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================
   HEADER - Atlassian Style
   ============================================ */
.modern-header {
  background: var(--bg-primary);
  border-bottom: 2px solid var(--bg-tertiary);
  padding: 24px 0;
  box-shadow: var(--shadow-sm);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.brand-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.02em;
}

.powered-by {
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.powered-by strong {
  color: var(--text-secondary);
  font-weight: 600;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  padding: 64px 0;
  min-height: calc(100vh - 100px);
}

/* ============================================
   PROGRESS BAR - Atlassian Stepped Progress
   ============================================ */
.progress-bar {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-bottom: 56px;
  padding: 32px;
  background: var(--bg-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
}

.step-indicator {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  border: 3px solid transparent;
  transition: all var(--transition-base);
  position: relative;
  z-index: 2;
}

.progress-step.active .step-indicator {
  background: var(--gradient-primary);
  color: white;
  border-color: white;
  box-shadow: 0 4px 12px rgba(0, 82, 204, 0.3);
  transform: scale(1.1);
}

.progress-step.completed .step-indicator {
  background: var(--success);
  color: white;
  border-color: white;
}

.progress-step.completed .step-indicator::after {
  content: '✓';
  position: absolute;
  font-size: 18px;
  font-weight: 700;
}

.step-label {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.progress-step.active .step-label {
  color: var(--primary-color);
  font-weight: 700;
}

.progress-line {
  width: 48px;
  height: 3px;
  background: var(--border-color);
  margin: 0 8px;
  flex-shrink: 0;
  /* .progress-bar aligns steps to flex-start, so this centers the line on
     the 40px step-indicator circle regardless of label text wrapping. */
  margin-top: calc(40px / 2 - 3px / 2);
}

.progress-step.completed + .progress-line {
  background: var(--success);
}

/* Mobile Progress */
@media (max-width: 768px) {
  .progress-bar {
    padding: 20px;
  }
  
  .step-label {
    display: none;
  }
  
  .step-indicator {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  
  .progress-line {
    width: 24px;
    margin: 0 4px;
  }
}

/* ============================================
   FORM SECTIONS
   ============================================ */
.enrollment-form {
  background: var(--bg-primary);
  border-radius: 16px;
  padding: 56px;
  box-shadow: var(--shadow-lg);
}

.form-section {
  display: none;
  animation: fadeInUp var(--transition-slow) ease-out;
}

.form-section.active {
  display: block;
}

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

.section-header {
  margin-bottom: 40px;
  text-align: left;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}

.section-description {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============================================
   FORM FIELDS - Atlassian Style
   ============================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

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

.form-field {
  margin-bottom: 24px;
}

.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.form-field input:not([type="radio"]):not([type="checkbox"]),
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  transition: all var(--transition-base);
  font-weight: 500;
  font-family: inherit;
}

.form-field input:not([type="radio"]):not([type="checkbox"]):hover,
.form-field select:hover,
.form-field textarea:hover {
  border-color: var(--text-tertiary);
  background: var(--bg-secondary);
}

.form-field input:not([type="radio"]):not([type="checkbox"]):focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(0, 82, 204, 0.1);
  background: var(--bg-primary);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text-tertiary);
  font-weight: 400;
}

.form-field textarea {
  min-height: 104px;
  resize: vertical;
}

.form-field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%235E6C84' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

.form-field input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.75;
}

.form-field input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

.field-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 8px;
  font-weight: 500;
}

/* ============================================
   GRADE & ISEE SELECTION - Pill Style
   ============================================ */
.grade-grid,
.isee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 12px;
}

.grade-option,
.isee-option {
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 2px solid transparent;
  border-radius: 24px;
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
  letter-spacing: -0.01em;
}

.grade-option:hover,
.isee-option:hover {
  background: var(--bg-hover);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.grade-option.selected,
.isee-option.selected {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(0, 82, 204, 0.3);
  transform: translateY(-2px);
}

/* ============================================
   COURSE SELECTION - Atlassian Cards
   ============================================ */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.course-card {
  padding: 32px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

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

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

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

.course-card.selected {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, rgba(0, 82, 204, 0.05) 0%, rgba(0, 101, 255, 0.05) 100%);
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.course-card.selected::before {
  transform: scaleX(1);
  height: 6px;
}

.course-card.selected::after {
  content: '✓';
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 82, 204, 0.3);
}

.course-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(0, 82, 204, 0.2);
}

.course-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.course-price {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.course-description {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  font-weight: 500;
}

/* ============================================
   SKELETON LOADERS
   ============================================ */
.course-skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.skeleton-product {
  height: 280px;
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 0%,
    var(--bg-hover) 50%,
    var(--bg-tertiary) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
  border-radius: 12px;
}

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

.course-skeleton.hidden {
  display: none;
}

/* Empty state shown when a partner has no enabled courses */
.course-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.course-empty-state h4 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--text-primary);
}

.course-empty-state p {
  margin: 0;
  font-size: 14px;
}

.course-empty-state a {
  color: var(--primary-color);
  font-weight: 600;
}

/* ============================================
   PAYMENT LAYOUT
   ============================================ */
.payment-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.summary-card,
.payment-card {
  padding: 32px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.summary-card h3,
.payment-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--bg-tertiary);
  font-size: 15px;
}

.summary-row:last-of-type {
  border-bottom: none;
}

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

.summary-value {
  color: var(--text-primary);
  font-weight: 700;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  margin: 24px -32px -32px;
  background: var(--bg-tertiary);
  border-top: 2px solid var(--border-color);
  border-radius: 0 0 12px 12px;
  font-weight: 700;
}

.total-amount {
  font-size: 32px;
  color: var(--primary-color);
  letter-spacing: -0.03em;
  font-weight: 700;
}

/* ============================================
   PAYMENT PLAN SELECTOR
   ============================================ */
.payment-plan-selector {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.plan-option {
  display: flex;
  align-items: center;
  padding: 20px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition-base);
}

.plan-option:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.plan-option input[type="radio"] {
  margin-right: 16px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.plan-option:has(input:checked) {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, rgba(0, 82, 204, 0.05) 0%, rgba(0, 101, 255, 0.05) 100%);
  box-shadow: 0 4px 12px rgba(0, 82, 204, 0.15);
}

.plan-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.plan-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.plan-desc {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.installment-info {
  padding: 20px;
  background: rgba(0, 184, 217, 0.08);
  border-radius: 12px;
  margin-bottom: 32px;
  border-left: 4px solid var(--secondary-color);
}

.installment-info h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.schedule-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
}

.schedule-date {
  font-size: 12px;
  color: var(--text-tertiary);
  font-style: italic;
  font-weight: 500;
}

/* ============================================
   PAYMENT METHOD
   ============================================ */
.payment-method {
  margin-bottom: 32px;
}

.payment-method label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.stripe-element {
  padding: 16px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  transition: all var(--transition-base);
}

.stripe-element:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(0, 82, 204, 0.1);
}

.error-message {
  color: var(--error);
  font-size: 13px;
  margin-top: 8px;
  font-weight: 600;
}

/* ============================================
   BUTTONS - Atlassian Style
   ============================================ */
.btn {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: -0.01em;
  text-transform: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 1px 1px rgba(9, 30, 66, 0.25), 0 0 1px rgba(9, 30, 66, 0.31);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0747A6 0%, #0052CC 100%);
  box-shadow: 0 4px 12px rgba(0, 82, 204, 0.25), 0 0 1px rgba(9, 30, 66, 0.31);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 1px rgba(9, 30, 66, 0.25);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--text-tertiary);
}

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

.btn-pay {
  width: 100%;
  padding: 16px;
  font-size: 16px;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 2px solid var(--bg-tertiary);
}

.form-actions-support {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.form-actions-support a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

.form-actions-support a:hover {
  text-decoration: underline;
}

/* ============================================
   LOADING STATE
   ============================================ */
.loading-state {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 4px solid var(--bg-tertiary);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ============================================
   CONFIRMATION
   ============================================ */
.confirmation-card {
  text-align: center;
  padding: 64px 32px;
}

.success-icon {
  margin: 0 auto 32px;
  animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.success-icon svg {
  filter: drop-shadow(0 4px 12px rgba(0, 135, 90, 0.3));
}

.confirmation-card h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.confirmation-message {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-weight: 500;
}

.ach-notice {
  padding: 20px;
  background: rgba(255, 153, 31, 0.1);
  border: 2px solid var(--warning);
  border-radius: 12px;
  margin-bottom: 40px;
}

.ach-notice p {
  font-size: 14px;
  color: var(--text-primary);
  text-align: left;
  font-weight: 600;
}

.confirmation-details {
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 40px;
}

.confirmation-details h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 15px;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row span:first-child {
  color: var(--text-secondary);
  font-weight: 600;
}

.detail-row span:last-child {
  color: var(--text-primary);
  font-weight: 700;
}

.confirmation-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* ============================================
   ERROR MESSAGES
   ============================================ */
.form-errors {
  padding: 16px 20px;
  background: rgba(222, 53, 11, 0.1);
  border: 2px solid var(--error);
  border-radius: 8px;
  color: var(--error);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
}

/* ============================================
   INSTALLMENT & BREAKDOWN
   ============================================ */
.installment-breakdown {
  padding: 16px;
  background: rgba(0, 184, 217, 0.08);
  border-radius: 8px;
  margin: 16px 0;
  border-left: 4px solid var(--secondary-color);
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
}

.breakdown-row span:last-child {
  color: var(--text-primary);
  font-weight: 700;
}

.course-summary-details {
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  margin: 12px 0;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .enrollment-form {
    padding: 32px;
  }
  
  .form-grid,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }
  
  .payment-layout {
    grid-template-columns: 1fr;
  }
  
  .course-grid {
    grid-template-columns: 1fr;
  }
  
  .section-header h2 {
    font-size: 24px;
  }
  
  .form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  
  .form-actions .btn {
    width: 100%;
  }

  .form-actions-support {
    text-align: center;
    white-space: normal;
  }
}

/* ============================================
   FLATPICKR OVERRIDES
   ============================================ */
.flatpickr-calendar {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  border: 2px solid var(--border-color) !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow-lg) !important;
}

.flatpickr-day.selected {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  box-shadow: 0 4px 12px rgba(0, 82, 204, 0.3) !important;
}

.flatpickr-day:hover {
  background: var(--bg-hover) !important;
  border-color: var(--primary-color) !important;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.hidden {
  display: none !important;
}

/* ============================================================================
   BELL CURVES BRAND RE-SKIN  (reference: bellcurves.github.io/enrollment_flow)
   ----------------------------------------------------------------------------
   Replaces the old Atlassian "modern" look (blue gradients, 12px radius,
   heavy shadows) with the flat, professional Bell Curves brand: steel-blue
   primary, deep-navy header, Helvetica, minimal 2–4px radius, border-based
   surfaces. Appended last so it overrides earlier rules by source order.
   Only colors / borders / radius / shadow / typography are touched — no layout
   properties — so the existing structure and JS hooks are untouched.
   ============================================================================ */

/* --- Design tokens (override the original :root above) --- */
:root {
  --primary-color: #33769F;   /* bc-blue */
  --primary-hover: #285F82;
  --secondary-color: #14B8A6; /* independence-teal */
  --accent-color: #F97316;    /* challenger-orange */
  --deep-navy: #16324A;

  --text-primary: #0D1B2A;    /* navy */
  --text-secondary: #64748B;  /* slate */
  --text-tertiary: #94A3B8;
  --border-color: #CBD5E1;    /* light */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;    /* off-white */
  --bg-tertiary: #F1F5F9;     /* pale */
  --bg-hover: #E7ECF1;

  --success: #0F9488;
  --error: #DC2626;
  --warning: #F97316;
  --info: #33769F;

  /* Flat look: soft borders instead of heavy shadows */
  --shadow-sm: 0 1px 2px rgba(13, 27, 42, 0.05);
  --shadow-md: 0 1px 3px rgba(13, 27, 42, 0.07);
  --shadow-lg: 0 4px 12px rgba(13, 27, 42, 0.08);
  --shadow-xl: 0 8px 24px rgba(13, 27, 42, 0.10);

  /* Gradients collapse to solid brand colors */
  --gradient-primary: #33769F;
  --gradient-secondary: #14B8A6;
  --gradient-hero: #16324A;

  --radius-sm: 2px;
  --radius-md: 4px;

  --transition-fast: 150ms cubic-bezier(0.23, 1, 0.32, 1);
  --transition-base: 250ms cubic-bezier(0.23, 1, 0.32, 1);
  --transition-slow: 350ms cubic-bezier(0.23, 1, 0.32, 1);
}

/* --- Typography --- */
body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* --- Header: deep navy with light text (matches reference) --- */
.modern-header {
  background: var(--deep-navy);
  border-bottom: none;
  box-shadow: none;
}
.modern-header .brand-name { color: #FFFFFF; }
.modern-header .powered-by { color: #7C93A3; }
.modern-header .powered-by strong { color: #C7D6E0; }

/* --- Flat radius on surfaces (was 12px; keep circles circular) --- */
.progress-bar,
.course-card,
.course-skeleton,
.summary-card,
.payment-card,
.confirmation-card,
.payment-layout,
.plan-option,
.payment-method,
.installment-info,
.installment-breakdown,
.form-section,
.error-message,
.ach-notice,
.stripe-element,
.enrollment-form {
  border-radius: var(--radius-md);
}

/* Border-based surfaces rather than heavy shadows */
.progress-bar,
.summary-card,
.payment-card,
.confirmation-card {
  box-shadow: none;
  border: 1px solid var(--border-color);
}

/* --- Buttons: flat, sharp, with tactile press --- */
.btn,
.btn-primary,
.btn-secondary,
.btn-pay {
  border-radius: var(--radius-md);
  font-weight: 700;
  box-shadow: none;
}
.btn-primary,
.btn-pay {
  background: var(--primary-color);
  color: #FFFFFF;
  border: 1px solid var(--primary-color);
}
.btn-primary:hover,
.btn-pay:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: none;
}
.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover { background: var(--bg-hover); }
.btn:active,
.btn-primary:active,
.btn-secondary:active,
.btn-pay:active { transform: scale(0.97); }

/* --- Inputs: sharp with steel-blue focus ring --- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea,
.form-field input,
.form-field select {
  border-radius: var(--radius-md);
}
input:focus,
select:focus,
textarea:focus,
.form-field input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(51, 118, 159, 0.18);
}

/* --- Selectable options / cards --- */
.grade-option,
.isee-option,
.payment-method,
.plan-option {
  border-radius: var(--radius-md);
}
.course-card.selected,
.grade-option.selected,
.isee-option.selected,
.plan-option.selected,
.payment-method.selected {
  border-color: var(--primary-color);
  background: #EEF5FA;
  color: var(--primary-color);
}

/* --- Active step indicator --- */
.progress-step.active .step-indicator {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #FFFFFF;
}

/* ============================================================================
   REFERENCE LAYOUT MATCH
   Matches the geometry/layout of bellcurves.github.io/enrollment_flow.html:
   deep-navy header w/ avatar, one bordered panel wrapping the small horizontal
   stepper + content, segmented test tabs, flat left-aligned course cards,
   bordered option buttons. Appended last; scoped to preserve JS hooks.
   ============================================================================ */

/* ---------- Header: avatar-style logo on the navy bar ---------- */
.modern-header { padding: 26px 0; box-shadow: none; }
.modern-header .brand-identity { gap: 16px; }
.modern-header .brand-logo {
  width: 46px;
  height: 46px;
  background: var(--primary-color);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  object-fit: cover;
}
.modern-header .brand-name { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }

/* ---------- One bordered panel around stepper + content (max 940px) ---------- */
.main-content { padding: 40px 0 80px; }
.main-content > .container {
  max-width: 940px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 40px 48px;
}
@media (max-width: 640px) {
  .main-content > .container { padding: 24px 20px; }
}

/* The form + sections no longer carry their own surface — the panel does. */
.enrollment-form,
.form-section {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}

/* ---------- Stepper: transparent row, small circle beside label ---------- */
.progress-bar {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 4px;
}
.progress-step {
  flex-direction: row;
  gap: 10px;
}
.step-indicator {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 13px;
  box-shadow: none;
}
.progress-step.active .step-indicator {
  transform: none;
  box-shadow: none;
  border: 1px solid var(--primary-color);
}
.progress-step.completed .step-indicator {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
  color: var(--text-secondary);
}
.step-label { font-size: 14px; font-weight: 500; letter-spacing: 0; }
/* .progress-bar aligns steps to flex-start and .step-indicator here is
   30px, so this centers the line on the circle instead of sitting at
   the top of the row. */
.progress-line { width: 48px; height: 1px; margin: calc(30px / 2 - 1px / 2) 14px 0; }

/* ---------- Section headings: left-aligned ---------- */
.section-header { text-align: left; }
.section-header h2 { font-size: 26px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.01em; }
.section-description { color: var(--text-secondary); }

/* Step 1 (test + course selection) reads top-to-bottom as one left-aligned
   block instead of a centered heading over a left-aligned toggle/grid. */
.section-header.section-header-left { text-align: left; }
#test-selection-wrapper { text-align: left; }

/* ---------- Test selector → segmented tabs (scoped to the test container) ---------- */
#test-type-selection-container.grade-grid {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}
#test-type-selection-container .grade-option {
  background: var(--bg-primary);
  border: none;
  border-radius: 0;
  padding: 9px 22px;
  min-height: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}
#test-type-selection-container .grade-option + .grade-option { border-left: 1px solid var(--border-color); }
#test-type-selection-container .grade-option:hover { background: var(--bg-tertiary); transform: none; box-shadow: none; }
#test-type-selection-container .grade-option.selected { background: var(--primary-color); color: #fff; transform: none; box-shadow: none; }

/* ---------- Grade / ISEE option buttons → bordered boxes (not pills) ---------- */
.grade-option,
.isee-option {
  padding: 0 8px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}
.grade-option:hover,
.isee-option:hover {
  background: var(--bg-primary);
  border-color: var(--primary-color);
  transform: none;
  box-shadow: none;
}
.grade-option.selected,
.isee-option.selected {
  background: #EEF5FA;
  border-color: var(--primary-color);
  color: var(--primary-color);
  font-weight: 700;
  transform: none;
  box-shadow: none;
}

/* ---------- Course cards: flat, left-aligned, square badge ---------- */
.course-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 28px; }
.course-card {
  padding: 24px 22px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: none;
  overflow: visible;
}
.course-card::before { display: none; }
.course-card:hover { border-color: var(--primary-color); box-shadow: none; transform: none; }
.course-card:hover::before { display: none; }
.course-card.selected {
  background: #EEF5FA;
  border-color: var(--primary-color);
  box-shadow: none;
  transform: none;
}
.course-card.selected::before { display: none; }
.course-card.selected::after {
  top: 14px;
  right: 14px;
  width: 22px;
  height: 22px;
  font-size: 13px;
  background: var(--primary-color);
  box-shadow: none;
}
.course-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--primary-color);
  color: #fff;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}
.course-title { font-size: 18px; margin-bottom: 6px; letter-spacing: -0.01em; }
.course-price { font-size: 22px; margin-bottom: 14px; letter-spacing: 0; }
.course-description { font-size: 14px; font-weight: 400; color: var(--text-secondary); }

/* ---------- Footer actions: divider + spread ---------- */
.form-actions {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.form-actions-support { margin-right: auto; }

/* ---------- Flatten remaining bright-blue rules that out-specify the tokens ---------- */
.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: none;
}
.plan-option:has(input:checked) {
  background: #EEF5FA;
  border-color: var(--primary-color);
  box-shadow: none;
}
