/**
 * Register page — Silicon Valley academic enrollment UI
 */

.register-page {
  background: var(--surface, #f8fafc);
  color: var(--text, #334155);
  overflow-x: clip;
}

/* Navbar logo guard — prevents oversized brand image */
.register-page .site-navbar .navbar-brand {
  max-width: min(160px, 45vw);
  padding: 0;
  margin-right: 0.75rem;
}

.register-page .site-navbar .navbar-brand img,
.register-page .site-navbar__logo {
  display: block;
  height: 48px !important;
  max-height: 48px !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain;
}

.register-page-main {
  padding: clamp(1.25rem, 3vw, 2rem) 0 clamp(2.5rem, 5vw, 4rem);
}

/* Hero strip */
.register-hero {
  background: linear-gradient(135deg, #0c1524 0%, #1a2332 50%, #0c1524 100%);
  color: #fff;
  padding: clamp(2rem, 5vw, 3rem) 0;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  position: relative;
  overflow: hidden;
}

.register-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 40% 60% at 15% 20%, rgba(220, 113, 31, 0.2), transparent 55%),
    radial-gradient(ellipse 35% 50% at 90% 80%, rgba(211, 174, 66, 0.12), transparent 50%);
  pointer-events: none;
}

.register-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 1.5rem);
  text-align: center;
}

.register-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(211, 174, 66, 0.3);
  color: var(--accent-light, #f4d390);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.register-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff !important;
  margin-bottom: 0.75rem;
}

.register-hero__lead {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: rgba(255, 255, 255, 0.82);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.65;
}

/* Layout shell */
.register-shell {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 1.5rem);
}

.register-aside {
  position: sticky;
  top: calc(var(--nav-height, 76px) + 1rem);
}

.register-aside-card {
  background: linear-gradient(160deg, #1b6f6b 0%, #155955 100%);
  color: #fff;
  border-radius: 20px;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: 0 16px 40px rgba(21, 89, 85, 0.25);
}

.register-aside-card h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
}

.register-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.register-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.92);
}

.register-benefits li i {
  color: var(--accent-light, #f4d390);
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.register-aside-stat {
  display: flex;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.register-aside-stat div {
  flex: 1;
  text-align: center;
}

.register-aside-stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--accent-light, #f4d390);
}

.register-aside-stat span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.65);
}

/* Form card */
.registration-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.06);
  overflow: hidden;
  width: 100%;
  min-width: 0;
}

.registration-header {
  background: linear-gradient(135deg, #DC721F 0%, #B85A0F 100%);
  padding: clamp(1.5rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2rem);
  color: #fff;
  text-align: center;
}

.registration-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: #fff !important;
}

.registration-header p {
  font-size: 0.925rem;
  opacity: 0.92;
  margin: 0;
  color: #fff !important;
}

.registration-body {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  font-weight: 600;
  color: var(--dark, #0c1524);
  margin-bottom: 0.45rem;
  font-size: 0.875rem;
  display: block;
}

.form-label .required {
  color: var(--primary, #DC721F);
  margin-left: 2px;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted, #64748b);
  z-index: 2;
  pointer-events: none;
}

.input-wrapper textarea + .input-icon,
.input-wrapper .input-icon.textarea-icon {
  top: 1.1rem;
  transform: none;
}

.register-page .form-control,
.register-page .form-select {
  padding: 0.75rem 0.9rem 0.75rem 2.75rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.9375rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  background: #f8fafc;
  width: 100%;
}

.register-page .form-control:focus,
.register-page .form-select:focus {
  border-color: var(--primary, #DC721F);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(220, 113, 31, 0.12);
  outline: none;
}

.register-page .form-control.has-icon-right {
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  z-index: 2;
  padding: 4px;
}

.password-toggle:hover {
  color: var(--primary, #DC721F);
}

.btn-submit {
  background: linear-gradient(135deg, #DC721F 0%, #B85A0F 100%);
  border: none;
  color: #fff;
  padding: 0.95rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 999px;
  width: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 24px rgba(220, 113, 31, 0.35);
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(220, 113, 31, 0.42);
}

.btn-submit:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.alert {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  border: none;
  font-size: 0.875rem;
}

.alert-success { background: #d1fae5; color: #065f46; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }

.login-link {
  text-align: center;
  margin-top: 1.25rem;
  color: var(--text-muted, #64748b);
  font-size: 0.875rem;
}

.login-link a {
  color: var(--primary, #DC721F);
  text-decoration: none;
  font-weight: 600;
}

.login-link a:hover {
  text-decoration: underline;
}

.form-note {
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
  margin-top: 0.35rem;
}

.register-page .form-control.is-parent-copy,
.register-page .form-control[readonly] {
  background: #f1f5f9;
  cursor: not-allowed;
}

.form-check-inline-label {
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
  cursor: pointer;
  font-size: 0.8125rem;
  gap: 0.5rem;
}

.form-check-inline-label input {
  accent-color: var(--primary, #DC721F);
}

/* Exam categories */
.exam-categories {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.exam-category {
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  cursor: pointer;
  transition: background 0.2s ease;
}

.category-header:hover {
  background: #f1f5f9;
}

.category-title {
  display: flex;
  align-items: center;
  font-weight: 600;
  color: var(--dark, #0c1524);
  font-size: 0.875rem;
}

.category-title i {
  margin-right: 0.5rem;
  color: var(--primary, #DC721F);
}

.category-arrow {
  color: var(--text-muted, #64748b);
  transition: transform 0.25s ease;
}

.category-header.active .category-arrow {
  transform: rotate(180deg);
}

.category-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.category-content.active {
  max-height: 2000px;
}

.exam-options,
.subject-options,
.track-subjects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
  gap: 0.6rem;
  padding: 1rem;
  background: #fff;
}

.exam-option,
.subject-option {
  display: flex;
  align-items: center;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  min-width: 0;
}

.exam-option:hover,
.subject-option:hover {
  border-color: var(--primary, #DC721F);
  background: rgba(220, 113, 31, 0.04);
}

.exam-option.selected,
.subject-option.selected {
  border-color: var(--primary, #DC721F);
  background: rgba(220, 113, 31, 0.08);
}

.exam-option input,
.subject-option input {
  margin-right: 0.5rem;
  accent-color: var(--primary, #DC721F);
  flex-shrink: 0;
}

.exam-option label,
.subject-option label {
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  margin: 0;
  word-break: break-word;
}

.subject-track {
  margin-bottom: 1.25rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.track-header {
  background: #f8fafc;
  padding: 0.85rem 1rem;
  font-weight: 700;
  font-size: 0.875rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.track-header i {
  color: var(--primary, #DC721F);
}

.track-content {
  padding: 1rem;
}

/* Subscriptions */
.subscription-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 1rem;
}

.subscription-card {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.subscription-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  border-color: var(--primary, #DC721F);
}

.subscription-card.featured {
  border-color: var(--accent, #d3ae42);
}

.subscription-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--primary, #DC721F);
}

.subscription-price {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  color: var(--primary, #DC721F);
  margin: 0.5rem 0;
}

.package-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, #DC721F 0%, #B85A0F 100%);
  color: #fff;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.package-badge.premium {
  background: linear-gradient(135deg, #d3ae42 0%, #b8942a 100%);
  color: var(--dark, #0c1524);
}

.btn-subscribe-plan {
  background: linear-gradient(135deg, #DC721F 0%, #B85A0F 100%);
  color: #fff;
  border: none;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  font-size: 0.8125rem;
}

.btn-subscribe-plan:hover {
  opacity: 0.92;
}

.subscription-note,
.exam-combinations {
  font-size: 0.8125rem;
  padding: 0.85rem;
  border-radius: 8px;
  margin-top: 1rem;
}

.subscription-note {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  color: #92400e;
}

.exam-combinations {
  background: #f8fafc;
  border-left: 4px solid var(--primary, #DC721F);
}

.category-subjects {
  display: none;
}

.conditional-field {
  display: none;
  animation: registerFadeIn 0.3s ease;
}

.conditional-field.show {
  display: block;
}

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

/* Toast */
.toast-container {
  position: fixed;
  top: calc(var(--nav-height, 76px) + 0.75rem);
  right: clamp(0.75rem, 2vw, 1.25rem);
  left: clamp(0.75rem, 2vw, auto);
  z-index: 10000;
  max-width: min(400px, calc(100vw - 1.5rem));
}

.toast {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  padding: 1rem;
  margin-bottom: 0.75rem;
  animation: registerSlideIn 0.3s ease;
  border-left: 4px solid var(--primary, #DC721F);
  position: relative;
}

@keyframes registerSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #DC721F 0%, #B85A0F 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.65rem;
  flex-shrink: 0;
}

.toast-title {
  font-weight: 700;
  font-size: 0.9375rem;
}

.toast-body {
  font-size: 0.8125rem;
  line-height: 1.55;
}

.toast-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted, #64748b);
  cursor: pointer;
}

/* Responsive */
@media (max-width: 991.98px) {
  .register-shell {
    grid-template-columns: 1fr;
  }

  .register-aside {
    position: static;
  }

  .register-aside-stat {
    justify-content: center;
  }
}

@media (max-width: 767.98px) {
  .register-page .site-navbar .navbar-brand img,
  .register-page .site-navbar__logo {
    height: 40px !important;
    max-height: 40px !important;
  }

  .exam-options,
  .subject-options,
  .track-subjects,
  .subscription-cards {
    grid-template-columns: 1fr;
  }

  .registration-body .row > [class*="col-"] {
    margin-bottom: 0;
  }
}

@media (max-width: 575.98px) {
  .register-hero {
    padding: 1.75rem 0;
  }

  .registration-header,
  .registration-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.register-page .register-textarea {
  padding: 0.75rem 0.9rem 0.75rem 2.75rem;
  min-height: 100px;
  resize: vertical;
}

.register-page .input-icon.textarea-icon {
  top: 1rem;
  transform: none;
}
