* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: #f5f7fb;
  color: #28313c;
}

.auth-page {
  min-height: 100vh;
  padding: 24px;
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(440px, 100%);
  padding: 28px;
  background: #fff;
  border: 1px solid #e4e8ef;
  border-radius: 16px;
  box-shadow: 0 16px 44px rgba(28, 42, 57, .10);
}

.auth-brand {
  text-align: center;
}

.auth-brand h1 {
  margin: 0;
  color: #e44c9a;
  font-size: 42px;
}

.auth-brand p {
  margin: 6px 0 20px;
  color: #7b8794;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 18px;
}

.auth-tab {
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: #eef1f5;
  cursor: pointer;
}

.auth-tab.active {
  background: #e44c9a;
  color: #fff;
}

.form {
  display: none;
}

.form.active {
  display: block;
}

.field-group {
  margin-bottom: 14px;
}

.field-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

.field-group input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #ccd5df;
  border-radius: 8px;
  outline: none;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 78px;
}

.show-password {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #60758a;
  cursor: pointer;
}

.primary-button {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: #e44c9a;
  color: #fff;
  cursor: pointer;
}

.text-button {
  width: 100%;
  margin-top: 10px;
  border: 0;
  background: transparent;
  color: #65768a;
  cursor: pointer;
}

.message {
  display: none;
}

.message.show {
  display: block;
  margin-bottom: 14px;
  padding: 10px;
  border-radius: 8px;
}

.message.error {
  background: #fff0f0;
  color: #a53b3b;
}

.message.success {
  background: #edf9f0;
  color: #347148;
}

.terms-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
}

.terms-row input {
  margin-top: 2px;
}


/* USERNAME COM @ FIXO */

.username-input-wrap {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 46px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  transition:
    border-color .18s ease,
    box-shadow .18s ease;
}

.username-input-wrap:focus-within {
  border-color: #e44c9a;
  box-shadow: 0 0 0 3px rgba(228, 76, 154, .10);
}

.username-prefix {
  flex: 0 0 auto;
  padding-left: 13px;
  color: #64748b;
  font-weight: 700;
  user-select: none;
  pointer-events: none;
}

.username-input-wrap input {
  flex: 1;
  min-width: 0;
  width: auto;
  height: 44px;
  padding: 12px 13px 12px 3px !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.username-input-wrap input::placeholder {
  color: #9aa6b2;
}

.field-hint {
  display: block;
  margin-top: 5px;
  color: #74808a;
  font-size: 11px;
  line-height: 1.35;
}


/* =========================================================
   CADASTRO 18+ / TERMOS E PRIVACIDADE
   ========================================================= */

.legal-link {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d83f8d;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.legal-link:hover {
  color: #b92e75;
}

.legal-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(21, 29, 40, .68);
  overflow-y: auto;
}

.legal-modal-backdrop.show {
  display: flex;
}

.legal-modal {
  width: min(820px, 100%);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
}

.legal-modal-header {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #e4e9ef;
  background: #fff;
}

.legal-kicker {
  display: block;
  margin-bottom: 3px;
  color: #e44c9a;
  font-size: 12px;
  font-weight: 700;
}

.legal-modal-header h2 {
  margin: 0;
  color: #26323d;
  font-size: 21px;
  line-height: 1.25;
}

.legal-modal-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: #f1f4f7;
  color: #5d6873;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.legal-modal-content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 22px;
  scroll-behavior: smooth;
}

.legal-section + .legal-section {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid #e2e8ef;
}

.legal-section h3 {
  margin: 0 0 16px;
  color: #e44c9a;
  font-size: 22px;
}

.legal-section h4 {
  margin: 20px 0 6px;
  color: #354454;
  font-size: 15px;
}

.legal-section p {
  margin: 0 0 11px;
  color: #52606d;
  line-height: 1.62;
  font-size: 13px;
}

.legal-section strong {
  color: #34414d;
}

.legal-updated {
  margin-top: 24px !important;
  color: #7e8994 !important;
  font-size: 12px !important;
}

.legal-modal-footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  padding: 13px 18px;
  border-top: 1px solid #e3e8ee;
  background: #f8fafc;
}

.legal-ok-button {
  min-width: 110px;
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  background: #e44c9a;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

body.legal-modal-open {
  overflow: hidden;
}


@media (max-width: 600px) {
  .legal-modal-backdrop {
    padding: 8px;
    align-items: flex-start;
  }

  .legal-modal {
    max-height: calc(100vh - 16px);
    border-radius: 10px;
  }

  .legal-modal-header {
    padding: 14px;
  }

  .legal-modal-header h2 {
    font-size: 18px;
  }

  .legal-modal-content {
    padding: 16px;
  }

  .legal-section p {
    font-size: 13px;
  }
}


#registerBirthDate {
  min-height: 46px;
}


/* =========================================================
   FOTO DE PERFIL NO CADASTRO
   ========================================================= */

.profile-photo-signup-group {
  margin-bottom: 18px;
}

.signup-photo-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.signup-photo-picker {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: center;
}

.signup-photo-preview-wrap {
  width: 88px;
  height: 88px;
  display: block;
  overflow: hidden;
  border: 2px solid #d7e0e9;
  border-radius: 50%;
  background: #edf2f7;
}

.signup-photo-preview {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.signup-photo-picker-text {
  display: block;
  margin-top: 5px;
  color: #d83f8d;
  font-size: 11px;
  font-weight: 700;
}

.signup-photo-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.signup-photo-info strong {
  color: #334155;
  font-size: 13px;
}

.signup-photo-info > span:not(.signup-photo-status) {
  color: #7b8794;
  font-size: 11px;
  line-height: 1.35;
}

.signup-photo-status {
  margin-top: 2px;
  color: #758392;
  font-size: 11px;
  font-weight: 700;
}

.signup-photo-status.loading {
  color: #7d6b20;
}

.signup-photo-status.approved {
  color: #237044;
}

.signup-photo-status.rejected,
.signup-photo-status.error {
  color: #ad3737;
}

@media (max-width: 420px) {
  .signup-photo-row {
    align-items: flex-start;
  }

  .signup-photo-preview-wrap {
    width: 74px;
    height: 74px;
  }
}


/* FOTO DE PERFIL OBRIGATÓRIA NO CADASTRO */
.signup-photo-required {
  display: block;
  margin-top: 4px;
  color: #7c6e86;
  font-size: 11px;
  line-height: 1.35;
}

#registerForm button[type="submit"]:disabled {
  opacity: .5;
  cursor: not-allowed;
}
