/* ============================================
   REGISTRAR CONTA - Design Premium & Minimalista
   ============================================ */

:root {
  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --accent-bg: #f0edff;
  --accent-glow: rgba(108, 92, 231, 0.15);
  --success: #00b894;
  --success-bg: #e6faf5;
  --surface: #ffffff;
  --bg: #f7f8fc;
  --text-primary: #2d3436;
  --text-secondary: #636e72;
  --text-muted: #b2bec3;
  --border: #e8ecf1;
  --border-focus: #6c5ce7;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--bg);
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   LAYOUT WRAPPER
   ============================================ */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 680px;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

/* ============================================
   LOGO
   ============================================ */
.logo-container {
  text-align: center;
  margin-bottom: 0.5rem;
}

.logo-container img {
  height: 56px;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
}

.logo-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* ============================================
   PROGRESS STEPPER - Modern Style
   ============================================ */
.progress-indicator {
  display: flex;
  margin-bottom: 2rem;
  position: relative;
  padding: 0 1rem;
}

.progress-indicator::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.progress-indicator::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 15%;
  height: 2px;
  background: var(--accent);
  z-index: 1;
  transition: width 0.5s ease;
  width: 0;
}

.progress-indicator.step-2::after {
  width: 35%;
}

.progress-indicator.step-3::after {
  width: 70%;
}

.step-item {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 2;
  background: transparent;
  padding: 0;
}

.step-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  color: var(--text-muted);
  transition: var(--transition);
  font-size: 1rem;
}

.step-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
  letter-spacing: 0.01em;
}

/* Active Step */
.step-item.active .step-icon {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 4px 14px var(--accent-glow);
  transform: scale(1.05);
}

.step-item.active .step-label {
  color: var(--accent);
  font-weight: 600;
}

/* Completed Step */
.step-item.completed .step-icon {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.step-item.completed .step-label {
  color: var(--success);
  font-weight: 600;
}

/* ============================================
   STEP CONTENT & ANIMATIONS
   ============================================ */
.step-content {
  display: none;
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-content.active {
  display: block;
}

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

/* ============================================
   ALERT NOTICE - Refined
   ============================================ */
.alert-notice {
  background: var(--accent-bg);
  border: none;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--accent);
}

.alert-notice h5 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.alert-notice p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.notice-icon {
  color: var(--accent);
  margin-right: 1rem;
  font-size: 1.25rem;
}

.notice-list {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(108, 92, 231, 0.12);
}

.notice-list div {
  display: flex;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.notice-list i {
  margin-right: 0.5rem;
  width: 16px;
  flex-shrink: 0;
}

/* ============================================
   FORM CONTROLS - Clean & Modern
   ============================================ */
.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

.form-control,
.form-control-lg {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  color: var(--text-primary);
  background: var(--surface);
  transition: var(--transition);
  font-family: inherit;
}

.form-control:hover,
.form-control-lg:hover {
  border-color: #d0d5dd;
}

.form-control:focus,
.form-control-lg:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.form-control.is-invalid {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.invalid-feedback {
  font-size: 0.78rem;
  margin-top: 0.35rem;
}

/* ============================================
   BUTTONS - Premium Style
   ============================================ */
.btn-primary {
  background: var(--accent);
  border: none;
  color: white;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.5rem;
  font-size: 0.9rem;
  transition: var(--transition);
  letter-spacing: 0.01em;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
  background: #5b4cdb;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.3);
}

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

.btn-primary:disabled {
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}

.btn-success {
  background: var(--success);
  border: none;
  color: white;
  font-weight: 600;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(0, 184, 148, 0.2);
}

.btn-success:hover {
  background: #00a885;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 184, 148, 0.3);
}

.btn-outline-secondary {
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  background: transparent;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.btn-outline-secondary:hover {
  background: var(--bg);
  border-color: #d0d5dd;
  color: var(--text-primary);
}

.btn-lg {
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.92rem;
}

/* ============================================
   VERIFICATION SECTION
   ============================================ */
.verification-section {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  border: 1px solid var(--border);
}

.verification-icon {
  width: 72px;
  height: 72px;
  background: var(--accent-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--accent);
  font-size: 1.75rem;
}

.verification-section h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.verification-section p {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* ============================================
   CODE INPUT - OTP Style
   ============================================ */
.code-input {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 1.75rem 0;
}

.code-digit {
  width: 48px;
  height: 54px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  color: var(--text-primary);
  background: var(--surface);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.code-digit:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  outline: none;
  transform: translateY(-2px);
}

.code-digit:not(:placeholder-shown) {
  border-color: var(--accent-light);
  background: var(--accent-bg);
}

/* ============================================
   REVIEW DATA - Card Style
   ============================================ */
.review-data {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1.75rem;
  border: 1px solid var(--border);
}

.review-title {
  display: block;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.review-value {
  display: block;
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1rem;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ============================================
   TERMS & MISC
   ============================================ */
.terms-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.terms-link:hover {
  text-decoration: underline;
  color: #5b4cdb;
}

.resend-timer {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.badge.bg-success {
  background-color: var(--success) !important;
  font-weight: 500;
  font-size: 0.72rem;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
}

/* ============================================
   SUCCESS ANIMATION
   ============================================ */
.success-animation {
  color: var(--success);
  font-size: 3rem;
  animation: checkmark 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes checkmark {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Loading styles handled by loader2.css */

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 767.98px) {
  .auth-wrapper {
    padding: 1rem 0.75rem;
    align-items: flex-start;
  }

  .auth-card {
    max-width: 100%;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
  }

  .auth-card .container {
    padding: 1.25rem !important;
  }

  .logo-container img {
    height: 48px;
  }

  .logo-title {
    font-size: 1.25rem;
  }

  .progress-indicator {
    margin-bottom: 1.5rem;
    padding: 0;
  }

  .step-icon {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  .step-label {
    font-size: 0.65rem;
  }

  .alert-notice {
    padding: 1rem 1.25rem;
  }

  .alert-notice h5 {
    font-size: 0.88rem;
  }

  .verification-section {
    padding: 1.75rem 1.25rem;
  }

  .btn-lg {
    padding: 0.65rem 1.25rem;
    font-size: 0.88rem;
  }
}

@media (max-width: 575.98px) {
  .auth-wrapper {
    padding: 0.5rem;
  }

  .auth-card .container {
    padding: 1rem !important;
  }

  .progress-indicator::before {
    top: 16px;
  }

  .step-icon {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .step-label {
    font-size: 0.58rem;
    line-height: 1.2;
  }

  .logo-container img {
    height: 42px;
  }

  .logo-title {
    font-size: 1.1rem;
  }

  .form-control,
  .form-control-lg {
    font-size: 16px;
    padding: 0.65rem 0.85rem;
  }

  .form-label {
    font-size: 0.78rem;
  }

  .code-digit {
    width: 40px;
    height: 46px;
    font-size: 1.15rem;
  }

  .code-input {
    gap: 6px;
  }

  .verification-icon {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
  }

  .review-data {
    padding: 1.25rem;
  }
}

/* ============================================
   PASSWORD TOGGLE & STRENGTH INDICATOR
   ============================================ */
.password-wrapper {
  position: relative;
}

.password-wrapper .form-control {
  padding-right: 2.75rem;
}

.password-toggle-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 3;
  padding: 0.35rem;
  border-radius: 8px;
  transition: var(--transition);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.password-toggle-btn:hover {
  background: var(--accent-bg);
  color: var(--accent);
}

.password-toggle-btn svg {
  transition: var(--transition);
}

.password-strength {
  margin-top: 0.5rem;
}

.password-strength-bars {
  display: flex;
  gap: 4px;
  margin-bottom: 0.35rem;
}

.password-strength-bar {
  height: 3px;
  flex: 1;
  border-radius: 3px;
  background: var(--border);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.password-strength-bar.active {
  transform: scaleY(1.2);
}

.password-strength[data-strength="0"] .password-strength-bar { background: var(--border); }

.password-strength[data-strength="1"] .password-strength-bar.active { background: #e74c3c; }
.password-strength[data-strength="2"] .password-strength-bar.active { background: #f39c12; }
.password-strength[data-strength="3"] .password-strength-bar.active { background: #f1c40f; }
.password-strength[data-strength="4"] .password-strength-bar.active { background: #00b894; }
.password-strength[data-strength="5"] .password-strength-bar.active { background: #00b894; }

.password-strength-text {
  font-size: 0.72rem;
  font-weight: 500;
  transition: color 0.3s ease;
  color: var(--text-muted);
}

.password-strength[data-strength="1"] .password-strength-text { color: #e74c3c; }
.password-strength[data-strength="2"] .password-strength-text { color: #f39c12; }
.password-strength[data-strength="3"] .password-strength-text { color: #f1c40f; }
.password-strength[data-strength="4"] .password-strength-text { color: #00b894; }
.password-strength[data-strength="5"] .password-strength-text { color: #00b894; }

.password-requirements {
  margin-top: 0.5rem;
  padding: 0;
  list-style: none;
}

.password-requirements li {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.2rem;
  transition: color 0.3s ease;
}

.password-requirements li .req-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.password-requirements li.met {
  color: #00b894;
}

.password-requirements li.met .req-icon svg {
  stroke: #00b894;
}

.password-requirements li:not(.met) .req-icon svg {
  stroke: var(--text-muted);
}

.password-match-msg {
  font-size: 0.72rem;
  margin-top: 0.35rem;
  font-weight: 500;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(-4px);
}

.password-match-msg.visible {
  opacity: 1;
  transform: translateY(0);
}

.password-match-msg.match {
  color: #00b894;
}

.password-match-msg.no-match {
  color: #e74c3c;
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
  .btn,
  .form-control,
  .form-check-input {
    min-height: 44px;
  }

  .code-digit {
    min-height: 48px;
  }
}
