/* ================================================================
   CADASTRO – Page-specific styles
   ================================================================ */

/* ---- Page layout ---- */
.reg-page {
  min-height: 100vh;
  padding: 100px 0 60px;
  background: linear-gradient(135deg, #0f1a12 0%, #162219 55%, #2C3F31 100%);
  position: relative;
  overflow: hidden;
}

.reg-page__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.reg-page__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

/* ---- Left info panel ---- */
.reg-info {
  color: var(--white);
  padding-top: 24px;
}

.reg-info__title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--white);
  margin: 16px 0 20px;
}

.reg-info__title strong {
  background: linear-gradient(90deg, #F6D42A, #a0d060);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.reg-info__desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,.7);
  line-height: 1.7;
  margin-bottom: 36px;
}

.reg-benefits {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.reg-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-size: .95rem;
}

.reg-benefit__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.reg-benefit__icon svg { width: 18px; height: 18px; }

.reg-benefit__icon--blue   { background: rgba(246,212,42,.15); color: #F6D42A; }
.reg-benefit__icon--green  { background: rgba(52,211,153,.2); color: #6ee7b7; }
.reg-benefit__icon--purple { background: rgba(167,139,250,.2); color: #c4b5fd; }

.reg-benefits li strong {
  display: block;
  color: var(--white);
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: 2px;
}

.reg-benefits li span {
  color: rgba(255,255,255,.6);
  font-size: .85rem;
  line-height: 1.5;
}

.reg-info__trust {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: rgba(255,255,255,.5);
  font-weight: 500;
}

.reg-info__trust .trust-icon {
  width: 16px;
  height: 16px;
  color: #4ade80;
  flex-shrink: 0;
}

/* ---- Form card ---- */
.reg-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
}

.reg-card__title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.reg-card__subtitle {
  font-size: .92rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 28px;
}

.reg-card__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--blue-600);
  cursor: pointer;
  margin-bottom: 24px;
  transition: color var(--transition);
}

.reg-card__back:hover { color: var(--blue-800); }
.reg-card__back svg { width: 16px; height: 16px; }

.reg-card__login {
  text-align: center;
  margin-top: 20px;
  font-size: .88rem;
  color: var(--gray-600);
}

.reg-card__login a {
  color: var(--blue-600);
  font-weight: 600;
}

.reg-card__login a:hover { text-decoration: underline; }

/* ---- Progress (4 steps) ---- */
.reg-progress {
  display: flex;
  align-items: center;
  margin-bottom: 36px;
  overflow: hidden;
}

.reg-progress__step {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--gray-400);
  transition: color var(--transition);
  flex-shrink: 0;
}

.reg-progress__step span {
  white-space: nowrap;
}

.reg-progress__step--active { color: var(--blue-600); }
.reg-progress__step--done   { color: var(--green-600); }

.reg-progress__dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  background: var(--white);
  transition: all var(--transition);
  flex-shrink: 0;
}

.reg-progress__step--active .reg-progress__dot {
  border-color: var(--blue-600);
  background: var(--blue-600);
  color: var(--white);
}

.reg-progress__step--done .reg-progress__dot {
  border-color: var(--green-600);
  background: var(--green-600);
  color: var(--white);
}

.reg-progress__line {
  flex: 1;
  height: 2px;
  background: var(--gray-200);
  margin: 0 8px;
  border-radius: 2px;
  min-width: 8px;
}

/* ---- Form elements ---- */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.form-required { color: var(--red-600); }

.form-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--gray-400);
  pointer-events: none;
  flex-shrink: 0;
}

.form-input {
  width: 100%;
  padding: 13px 44px 13px 44px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--gray-50);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.form-input--no-right-icon {
  padding-right: 48px;
}

.form-input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(44,63,49,.15);
  background: var(--white);
}

.form-input::placeholder { color: var(--gray-400); }

.form-input--error {
  border-color: var(--red-600) !important;
  box-shadow: 0 0 0 3px rgba(220,38,38,.1) !important;
}

.form-input--success {
  border-color: var(--green-600) !important;
  box-shadow: 0 0 0 3px rgba(5,150,105,.1) !important;
}

.form-input-status {
  position: absolute;
  right: 14px;
  display: flex;
  align-items: center;
}

.status-icon { width: 20px; height: 20px; }
.status-icon--ok    { color: var(--green-600); }
.status-icon--error { color: var(--red-600); }
.status-icon--spin  { color: var(--blue-500); animation: spin .7s linear infinite; }

.form-hint {
  font-size: .78rem;
  color: var(--gray-400);
  margin-top: 6px;
}

.form-error {
  font-size: .78rem;
  color: var(--red-600);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---- Block button ---- */
.btn--block {
  width: 100%;
  justify-content: center;
  padding: 15px 24px;
  font-size: 1rem;
}

.btn--block:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ---- Spinner ---- */
.btn-spinner {
  width: 18px;
  height: 18px;
  animation: spin .7s linear infinite;
}

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

/* ---- CPF confirmed badge ---- */
.reg-cpf-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--green-100);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 600;
  color: #065f46;
  margin-bottom: 24px;
}

.reg-cpf-badge svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ---- Profile notice ---- */
.reg-profile-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-sm);
  font-size: .84rem;
  color: var(--blue-800);
  line-height: 1.55;
  margin-bottom: 20px;
}

.reg-profile-notice svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; color: var(--blue-600); }

/* ---- Terms checkbox ---- */
.form-terms { margin-bottom: 24px; }

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: .85rem;
  color: var(--gray-600);
  line-height: 1.55;
  user-select: none;
}

.form-checkbox input { position: absolute; opacity: 0; width: 0; height: 0; }

.form-checkbox__box {
  width: 18px;
  height: 18px;
  border: 2px solid var(--gray-300);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), background var(--transition);
  background: var(--white);
}

.form-checkbox input:checked ~ .form-checkbox__box {
  background: var(--blue-600);
  border-color: var(--blue-600);
}

.form-checkbox input:checked ~ .form-checkbox__box::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid var(--white);
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

.form-checkbox a { color: var(--blue-600); font-weight: 600; }
.form-checkbox a:hover { text-decoration: underline; }

/* ---- Step icon (centered) ---- */
.verify-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
}

.verify-icon svg { width: 100%; height: 100%; }

/* ---- Dev code banner ---- */
.dev-code-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fef9c3;
  border: 1px solid #fde047;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  color: #713f12;
  margin-bottom: 24px;
}

.dev-code-banner svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #ca8a04;
}

/* ---- 6-digit code input ---- */
.code-input-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.code-digit {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font, 'Inter', sans-serif);
  color: var(--gray-900);
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  background: var(--gray-50);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  caret-color: transparent;
  outline: none;
}

.code-digit:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(44,63,49,.15);
  background: var(--white);
}

.code-digit--filled {
  border-color: var(--blue-400);
  background: var(--white);
}

.code-digit--error {
  border-color: var(--red-500) !important;
  box-shadow: 0 0 0 3px rgba(220,38,38,.12) !important;
  animation: shake .3s ease;
}

.code-separator {
  font-size: 1.4rem;
  color: var(--gray-300);
  font-weight: 300;
  margin: 0 2px;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-4px); }
  60%       { transform: translateX(4px); }
}

/* ---- Countdown & Resend ---- */
.verify-resend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 24px;
  min-height: 22px;
}

.verify-countdown {
  font-size: .84rem;
  color: var(--gray-500);
}

.verify-resend__btn {
  background: none;
  border: none;
  padding: 0;
  font-size: .84rem;
  font-weight: 600;
  color: var(--blue-600);
  cursor: pointer;
  font-family: var(--font, inherit);
  transition: color var(--transition);
}

.verify-resend__btn:hover { color: var(--blue-800); text-decoration: underline; }

/* ---- Password toggle ---- */
.pwd-toggle {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.pwd-toggle:hover { color: var(--gray-600); }

.eye-icon {
  width: 20px;
  height: 20px;
}

/* ---- Password strength bar ---- */
.pwd-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.pwd-strength__bar {
  flex: 1;
  height: 5px;
  background: var(--gray-100);
  border-radius: 99px;
  overflow: hidden;
}

.pwd-strength__fill {
  height: 100%;
  border-radius: 99px;
  width: 0;
  transition: width .3s ease, background .3s ease;
}

.pwd-strength__label {
  font-size: .75rem;
  font-weight: 600;
  min-width: 60px;
  text-align: right;
}

/* ---- Password requirements list ---- */
.pwd-requirements {
  list-style: none;
  padding: 0;
  margin: 0 0 4px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.req-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .84rem;
  color: var(--gray-500);
  transition: color .2s;
}

.req-item.req--ok   { color: var(--green-700); }
.req-item.req--fail { color: var(--red-600); }

.req-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .6rem;
  transition: background .2s, border .2s;
}

.req-icon--neutral {
  border: 2px solid var(--gray-300);
  background: var(--white);
}

.req-icon--ok {
  background: var(--green-500);
  border: 2px solid var(--green-500);
}

.req-icon--ok::after {
  content: '';
  display: block;
  width: 4px;
  height: 7px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

.req-icon--fail {
  background: var(--red-500);
  border: 2px solid var(--red-500);
}

.req-icon--fail::after {
  content: '×';
  color: #fff;
  font-size: .85rem;
  font-weight: 900;
  line-height: 1;
}

/* ---- Success state ---- */
.reg-success {
  text-align: center;
  padding: 16px 0;
}

.reg-success__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
}

.reg-success__icon svg { width: 100%; height: 100%; }

.reg-success__title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.reg-success__desc {
  font-size: .95rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 32px;
}

.reg-success__notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 24px;
  font-size: .88rem;
  color: #92400e;
  text-align: left;
}

/* ---- Footer tweak ---- */
.reg-footer { padding-top: 0; }
.reg-footer .footer__bottom-inner a { color: rgba(255,255,255,.4); }
.reg-footer .footer__bottom-inner a:hover { color: var(--white); }

/* ---- Utility ---- */
.hidden { display: none !important; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .reg-page__inner { grid-template-columns: 1fr; gap: 40px; }
  .reg-info { padding-top: 0; }
}

@media (max-width: 520px) {
  .reg-card { padding: 28px 20px; }
  .reg-page { padding: 90px 0 48px; }
  .code-digit { width: 40px; height: 50px; font-size: 1.3rem; }
  .reg-progress__step span { display: none; }
}
