/* ===================================================================
   PERSONAL REGISTRATION PAGE
   Reuses design tokens from login-core.css
   =================================================================== */

/* --------------- Layout --------------- */
.register-page {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
  background: var(--bg-primary);
  font-family: var(--font-body);
  color: var(--text-primary);
}

/* --------------- Brand Panel (Left) --------------- */
.register-brand {
  flex: 0 0 45%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--space-3xl) var(--space-2xl);
  background: linear-gradient(135deg, #1C1917 0%, #292524 50%, #3D3632 100%);
  color: #F5F0EB;
  position: relative;
  overflow: hidden;
}

.register-brand::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(212, 101, 74, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.register-brand-content {
  position: relative;
  z-index: 1;
  max-width: 400px;
  text-align: center;
}

.register-brand-logo {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.register-brand-tagline {
  font-size: var(--text-body-lg);
  color: #C4BAA8;
  margin-bottom: var(--space-2xl);
  line-height: var(--leading-relaxed);
}

.register-brand-features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-2xl) 0;
  text-align: left;
}

.register-brand-features li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-size: var(--text-body);
  color: #C4BAA8;
}

.register-brand-features li i {
  color: var(--accent-primary);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.register-brand-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.register-brand-links a {
  color: var(--accent-primary);
  text-decoration: none;
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  transition: color var(--duration-normal) var(--ease-smooth);
}

.register-brand-links a:hover {
  color: var(--accent-secondary);
}

/* --------------- Auth Panel (Right) --------------- */
.register-auth {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  position: relative;
  background: var(--bg-primary);
}

.register-auth-inner {
  width: 100%;
  max-width: 440px;
}

/* --------------- Theme Toggle --------------- */
.register-theme-toggle {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  box-shadow: var(--neu-raised-sm);
  transition: background var(--duration-normal) var(--ease-smooth),
              color var(--duration-normal) var(--ease-smooth);
}

.register-theme-toggle:hover {
  color: var(--accent-primary);
}

/* --------------- Steps --------------- */
.register-step {
  display: none;
}

.register-step.active {
  display: block;
}

/* --------------- Typography --------------- */
.register-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: var(--weight-bold);
  margin: 0 0 var(--space-xs) 0;
  letter-spacing: -0.02em;
}

.register-subtitle {
  color: var(--text-secondary);
  font-size: var(--text-body);
  margin: 0 0 var(--space-xl) 0;
  line-height: var(--leading-normal);
}

/* --------------- Form --------------- */
.register-form-group {
  margin-bottom: var(--space-md);
}

.register-form-row {
  display: flex;
  gap: var(--space-md);
}

.register-form-group--half {
  flex: 1;
}

.register-label {
  display: block;
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.register-optional {
  font-weight: var(--weight-normal);
  color: var(--text-tertiary);
  font-size: var(--text-xs);
}

.register-input {
  width: 100%;
  padding: 12px 14px;
  font-size: var(--text-body);
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--neu-inset);
  transition: border-color var(--duration-normal) var(--ease-smooth),
              box-shadow var(--duration-normal) var(--ease-smooth);
  box-sizing: border-box;
}

.register-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.15);
}

.register-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B6560' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* --------------- DOB + Gender Row --------------- */
.register-form-group--dob {
  flex: 3;
  min-width: 0;
}

.register-form-group--gender {
  flex: 2;
  min-width: 0;
}

.register-dob-row {
  display: flex;
  gap: 6px;
}

.register-dob-select {
  min-width: 0;
  padding: 12px 8px;
  padding-right: 24px;
  font-size: var(--text-small);
  background-position: right 6px center;
}

/* --------------- Custom Select (DOB) --------------- */
.custom-select {
  position: relative;
  min-width: 0;
  flex: 1;
}

.custom-select-trigger {
  width: 100%;
  padding: 12px 24px 12px 8px;
  font-size: var(--text-small);
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--neu-inset);
  cursor: pointer;
  text-align: left;
  appearance: none;
  box-sizing: border-box;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B6560' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  transition: border-color var(--duration-normal) var(--ease-smooth),
              box-shadow var(--duration-normal) var(--ease-smooth);
}

.custom-select-trigger:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.15);
}

.custom-select-trigger.placeholder {
  color: var(--text-tertiary);
}

.custom-select-dropdown {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  max-height: 200px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.custom-select-dropdown.open {
  display: block;
}

.custom-select-dropdown.drop-up {
  bottom: 100%;
  margin-bottom: 4px;
}

.custom-select-dropdown.drop-down {
  top: 100%;
  margin-top: 4px;
}

.custom-select-option {
  padding: 8px 10px;
  font-size: var(--text-small);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-smooth);
}

.custom-select-option:hover {
  background: rgba(var(--accent-primary-rgb), 0.12);
}

.custom-select-option.selected {
  color: var(--accent-primary);
  font-weight: var(--weight-semibold);
}

/* Scrollbar styling */
.custom-select-dropdown::-webkit-scrollbar {
  width: 6px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

.register-otp-input {
  text-align: center;
  font-size: 1.5rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.3em;
  font-family: monospace;
}

/* --------------- Password Field --------------- */
.register-password-field {
  position: relative;
}

.register-password-field .register-input {
  padding-right: 44px;
}

.register-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
}

.register-password-toggle:hover {
  color: var(--text-secondary);
}

/* --------------- Email Status --------------- */
.register-email-status {
  font-size: var(--text-xs);
  margin-top: 4px;
  min-height: 18px;
}

.register-email-status.available {
  color: var(--accent-success);
}

.register-email-status.taken {
  color: var(--accent-primary);
}

/* --------------- Error --------------- */
.register-error {
  display: none;
  background: rgba(var(--accent-primary-rgb), 0.08);
  border: 1px solid rgba(var(--accent-primary-rgb), 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: var(--space-md);
  font-size: var(--text-small);
  color: var(--accent-primary);
}

.register-error.active {
  display: block;
}

/* --------------- Submit --------------- */
.register-submit {
  width: 100%;
  padding: 14px;
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  font-family: var(--font-body);
  color: #fff;
  background: var(--accent-primary);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--neu-btn);
  transition: background var(--duration-normal) var(--ease-smooth),
              transform var(--duration-fast) var(--ease-smooth),
              box-shadow var(--duration-normal) var(--ease-smooth);
  margin-top: var(--space-md);
}

.register-submit:hover {
  background: #C45A42;
  transform: translateY(-1px);
}

.register-submit:active {
  transform: translateY(0);
  box-shadow: var(--neu-btn-pressed);
}

.register-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* --------------- OTP Actions --------------- */
.register-otp-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-md);
}

.register-link {
  background: none;
  border: none;
  color: var(--accent-primary);
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  cursor: pointer;
  padding: 4px 0;
  font-family: var(--font-body);
  transition: color var(--duration-normal) var(--ease-smooth);
}

.register-link:hover {
  color: var(--accent-secondary);
}

/* --------------- Footer --------------- */
.register-footer {
  text-align: center;
  margin-top: var(--space-xl);
  font-size: var(--text-small);
  color: var(--text-secondary);
}

.register-footer a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: var(--weight-medium);
  margin-left: 4px;
}

.register-footer a:hover {
  color: var(--accent-secondary);
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 900px) {
  .register-page {
    flex-direction: column;
  }

  .register-brand {
    flex: none;
    padding: var(--space-2xl) var(--space-lg);
  }

  .register-brand-features {
    display: none;
  }

  .register-auth {
    padding: var(--space-xl) var(--space-lg);
  }
}

@media (max-width: 480px) {
  .register-form-row {
    flex-direction: column;
    gap: 0;
  }

  .register-auth-inner {
    max-width: 100%;
  }
}
