/* ─── REGISTER PAGE ─── */

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.register-main {
  flex: 1;
  display: flex;
  min-height: calc(100vh - var(--header-h));
}

.register-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  min-height: 100%;
}

/* ── Brand / esquerda ── */
.register-brand {
  background: var(--ink);
  padding: 60px 52px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.brand-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px;
  opacity: .5;
  pointer-events: none;
}

/* accent line left */
.register-brand::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
}

.brand-inner {
  position: relative;
  z-index: 1;
}

.brand-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.brand-headline {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 400;
  color: #fff;
  line-height: 1.1;
  margin: 0 0 18px;
}

.brand-headline em {
  font-style: italic;
  color: rgba(255, 255, 255, .4);
}

.brand-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, .45);
  line-height: 1.7;
  max-width: 320px;
  margin: 0 0 36px;
}

.brand-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 36px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.step-num {
  font-family: 'DM Serif Display', serif;
  font-size: 11px;
  font-weight: 400;
  color: var(--accent);
  background: rgba(200, 75, 47, .12);
  border: 1px solid rgba(200, 75, 47, .3);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 2px;
  letter-spacing: .5px;
}

.step-text {
  font-size: 13px;
  color: rgba(255, 255, 255, .6);
  padding-top: 5px;
  line-height: 1.4;
}

.brand-divider {
  width: 40px;
  height: 1px;
  background: rgba(255, 255, 255, .12);
  margin-bottom: 20px;
}

.brand-login-hint {
  font-size: 13px;
  color: rgba(255, 255, 255, .35);
  margin: 0;
}

.brand-login-hint a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

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

/* ── Formulário / direita ── */
.register-form-col {
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
}

.form-card {
  width: 100%;
  max-width: 440px;
}

.form-card-header {
  margin-bottom: 28px;
}

.form-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 10px;
}

.form-title {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 6px;
}

.form-subtitle {
  font-size: 13px;
  color: var(--ink-light);
  margin: 0;
  line-height: 1.5;
}

/* ── Erros gerais ── */
.form-errors {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: 2px;
  font-size: 12.5px;
  color: #b91c1c;
  margin-bottom: 20px;
}

/* ── Campos ── */
.reg-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--ink);
}

.field-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon {
  position: absolute;
  left: 11px;
  color: var(--rule);
  pointer-events: none;
  transition: color .2s;
}

.field-input {
  width: 100%;
  padding: 10px 12px 10px 34px;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}

.field-input::placeholder {
  color: rgba(61, 74, 92, .35);
}

.field-input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(15, 25, 35, .06);
}

.field-input:focus~.field-icon,
.field-input-wrap:focus-within .field-icon {
  color: var(--ink-light);
}

/* show/hide password */
.toggle-pass {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(61, 74, 92, .35);
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color .15s;
}

.toggle-pass:hover {
  color: var(--ink);
}

/* Error state */
.field--error .field-input {
  border-color: var(--accent);
}

.field--error .field-icon {
  color: rgba(200, 75, 47, .5);
}

.field-error-msg {
  font-size: 11px;
  color: var(--accent);
  margin: 0;
  line-height: 1.4;
}

/* ── Submit ── */
.reg-submit {
  margin-top: 8px;
  padding: 13px 20px;
  background: var(--ink);
  color: #fff;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .2s, transform .15s;
  width: 100%;
}

.reg-submit:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.reg-submit:active {
  transform: translateY(0);
}

.form-login-link {
  margin-top: 20px;
  font-size: 13px;
  color: var(--ink-light);
  text-align: center;
}

.form-login-link a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

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

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

  .register-brand {
    display: none;
  }

  .register-form-col {
    padding: 40px 24px;
  }

  .form-card {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

/* ─── LAYOUT ─── */
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-main {
  flex: 1;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 64px;
}

.auth-center {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ─── HEADING ─── */
.auth-heading {
  text-align: center;
}

.auth-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.auth-title {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  font-weight: 400;
  color: var(--ink);
  margin: 0;
}

/* ─── CARD ─── */
.auth-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  padding: 28px 32px 32px;
}

/* ─── TABS ─── */
.auth-tabs {
  display: flex;
  position: relative;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-light);
  cursor: pointer;
  transition: color .15s;
  z-index: 1;
}

.auth-tab.active {
  color: var(--ink);
  font-weight: 600;
}

.auth-tab:hover:not(.active) {
  color: var(--ink);
}

.auth-tab-indicator {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  width: 50%;
  background: var(--accent);
  transition: transform .22s cubic-bezier(.4, 0, .2, 1);
}

.auth-tab-indicator.at-login {
  transform: translateX(100%);
}

/* ─── PANEL ─── */
.auth-panel {
  animation: fadeUp .16s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── ERRORS ─── */
.form-errors {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  font-size: 12.5px;
  color: #b91c1c;
  margin-bottom: 16px;
}

/* ─── FIELDS ─── */
.reg-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--ink);
}

.field-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon {
  position: absolute;
  left: 11px;
  color: var(--rule);
  pointer-events: none;
  transition: color .2s;
}

.field-input {
  width: 100%;
  padding: 10px 12px 10px 34px;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: var(--paper);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}

.field-input::placeholder {
  color: rgba(61, 74, 92, .35);
}

.field-input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(15, 25, 35, .05);
  background: var(--white);
}

.field-input-wrap:focus-within .field-icon {
  color: var(--ink-light);
}

.toggle-pass {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(61, 74, 92, .3);
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color .15s;
}

.toggle-pass:hover {
  color: var(--ink);
}

.field--error .field-input {
  border-color: var(--accent);
}

.field-error-msg {
  font-size: 11px;
  color: var(--accent);
  margin: 0;
  line-height: 1.4;
}

.document-type-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--rule);
  background: var(--white);
}

.document-type-option {
  margin: 0;
  cursor: pointer;
}

.document-type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.document-type-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--ink-light);
  transition: background .15s, color .15s;
}

.document-type-option + .document-type-option span {
  border-left: 1px solid var(--rule);
}

.document-type-option input:checked + span {
  background: var(--ink);
  color: #fff;
}

.document-type-option input:focus-visible + span {
  box-shadow: 0 0 0 2px rgba(15, 25, 35, .12) inset;
}

.forgot-wrap {
  display: flex;
  justify-content: flex-end;
}

.forgot-link {
  font-size: 12px;
  color: var(--ink-light);
  text-decoration: none;
  transition: color .15s;
}

.forgot-link:hover {
  color: var(--accent);
}

/* ─── SUBMIT ─── */
.reg-submit {
  margin-top: 4px;
  padding: 13px 20px;
  background: var(--ink);
  color: #fff;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .2s, transform .15s;
  width: 100%;
}

.reg-submit:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.reg-submit:active {
  transform: translateY(0);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 480px) {
  .auth-card {
    padding: 24px 20px 28px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }
}

.back-home-btn {
  position: absolute;
  top: 2rem;
  left: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted, #6b7280);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.back-home-btn:hover {
  background: var(--surface-hover, #f3f4f6);
  color: var(--text-main, #111);
}

.field-row.has-single-field {
  grid-template-columns: 1fr;
}

.field-group.is-hidden {
  display: none;
}

@media (max-width: 480px) {
  .back-home-btn {
    top: 1rem;
    left: 1rem;
  }
}

.auth-main {
  flex: 1;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 64px;
  position: relative;
  /* 👈 adiciona isso */
}
