:root{--cor-primaria:#dd7597;--cor-primaria-hover:#dd8daa;--cor-secundaria:#3c348a;--cor-borda:#e5e7eb;--cor-fundo-input:#fafafa;--cor-texto:#1f2837;--cor-texto-secundario:#dd7597;--cor-erro:#ea4335}body{margin:0;min-height:100svh;font-family:Inter,ui-sans-serif,system-ui,sans-serif;color:var(--cor-texto)}[x-cloak]{display:none!important}
.welcome-screen {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
  background:
    radial-gradient(circle at 72% 27%, rgba(164, 63, 138, 0.94) 0, transparent 42%),
    radial-gradient(circle at 59% 92%, rgba(243, 78, 44, 0.9) 0, transparent 42%),
    radial-gradient(circle at 18% 43%, rgba(84, 84, 38, 0.88) 0, transparent 45%),
    linear-gradient(135deg, #3d4b2f 0%, #925e3d 45%, #783d76 100%);
}

.welcome-screen::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -8%;
  background:
    radial-gradient(ellipse at 50% 110%, rgba(255, 102, 40, 0.65), transparent 46%),
    radial-gradient(ellipse at 100% 65%, rgba(199, 56, 111, 0.55), transparent 50%);
  filter: blur(24px);
}

.welcome-content {
  width: min(100% - 20px, 580px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 0 28px;
  text-align: center;
}

.event-logo {
  width: min(100%, 440px);
  height: auto;
  margin-bottom: 36px;
}

.welcome-card {
  width: 100%;
  box-sizing: border-box;
  padding: 40px 36px 36px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 18px;
  color: #252a3a;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 34px rgba(38, 14, 38, 0.23);
  backdrop-filter: blur(16px);
}

.welcome-card h1 {
  margin: 0;
  color: #252a3a;
  font-size: clamp(2.35rem, 7.5vw, 2.85rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.welcome-card p {
  margin: 12px 0 28px;
  color: #5d6474;
  font-size: 1.15rem;
}

.account-actions {
  display: grid;
  gap: 14px;
}

.account-button {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 8px rgba(43, 35, 75, 0.18);
  transition: transform 160ms ease, filter 160ms ease;
}

.account-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.account-button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.login-button {
  background: #44389b;
}

.register-button {
  background: #dc7199;
}

.powered-by {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 32px;
}

.powered-by span {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.83);
  font-size: 0.9rem;
}

.powered-by img {
  width: 140px;
  height: auto;
}

.welcome-copyright {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.88rem;
}

.auth-card {
  text-align: left;
}

.auth-title {
  margin: 0 0 26px !important;
  color: var(--cor-primaria, #dd7597) !important;
  font-size: clamp(1.85rem, 5.5vw, 2.2rem) !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  text-align: center;
}

.auth-subtitle {
  margin: -14px 0 22px !important;
  color: #9a7b86 !important;
  font-size: 0.92rem !important;
  font-weight: 500 !important;
  text-align: center;
  line-height: 1.4;
}

.auth-success {
  padding: 14px 16px;
  border-radius: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 0.92rem;
  text-align: center;
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-error {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fde8ee;
  color: #9f1239;
  font-size: 0.95rem;
}

.auth-field {
  display: grid;
  gap: 8px;
  color: var(--cor-texto, #1f2837);
  font-size: 1.05rem;
  font-weight: 600;
}

.auth-field .form-control.input,
.form-control.input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--cor-borda, #e5e7eb);
  border-radius: 0.75rem;
  background: var(--cor-fundo-input, #fafafa);
  color: var(--cor-texto, #1f2837);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1rem;
  appearance: none;
  background-clip: padding-box;
  outline: none;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

@media (min-width: 768px) {
  .auth-field .form-control.input,
  .form-control.input {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
  }
}

.auth-field .form-control.input:focus,
.form-control.input:focus {
  border-color: var(--cor-secundaria, #3c348a);
  box-shadow: 0 0 0 3px rgba(60, 52, 138, 0.15);
}

.auth-field .form-control.input::placeholder,
.form-control.input::placeholder {
  color: #9ca3af;
}

.password-field {
  position: relative;
}

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

.toggle-password {
  position: absolute;
  top: 50%;
  right: 10px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 10px;
  color: #6b7280;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.toggle-password:hover {
  color: #44389b;
  background: rgba(68, 56, 155, 0.08);
}

.remember-me {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #374151;
  font-size: 1rem;
  font-weight: 500;
}

.remember-me input {
  width: 18px;
  height: 18px;
  accent-color: #44389b;
}

.auth-submit {
  margin-top: 6px;
  width: 100%;
  border: none;
  cursor: pointer;
}

.auth-submit:disabled {
  opacity: 0.75;
  cursor: wait;
}

.btn.btn_login {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  margin-top: 0.75rem;
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: 0.75rem;
  background: #44389b;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 200ms ease;
}

.btn.btn_login:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.btn.btn_login:disabled {
  opacity: 0.75;
  cursor: wait;
}

.btn .btn-loading {
  display: none;
}

.btn.htmx-request .btn-label {
  display: none;
}

.btn.htmx-request .btn-loading {
  display: inline;
}

.btn.btn_register.htmx-request,
.btn.btn_login.htmx-request,
.btn.btn_login:disabled {
  opacity: 0.75;
  cursor: wait;
  pointer-events: none;
}

#form-errors:empty {
  display: none;
}

#form-errors {
  margin-bottom: 4px;
}

.btn.btn_login:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

@media (min-width: 768px) {
  .btn.btn_login {
    margin-top: 1rem;
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
    font-size: 1rem;
  }
}

.btn.btn_primary {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  margin-top: 0.75rem;
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: 0.75rem;
  background: var(--cor-primaria, #dd7597);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 200ms ease;
}

.btn.btn_primary:hover:not(:disabled) {
  background: var(--cor-primaria-hover, #dd8daa);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.btn.btn_primary:disabled {
  opacity: 0.75;
  cursor: wait;
}

.btn.btn_primary:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

@media (min-width: 768px) {
  .btn.btn_primary {
    margin-top: 1rem;
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
    font-size: 1rem;
  }
}

.auth-links-single {
  margin-top: 22px;
}

.auth-links a,
.auth-links .back-home {
  color: var(--cor-primaria, #dd7597);
}

.auth-links {
  margin-top: 22px;
  text-align: center;
  font-size: 0.98rem;
}

.auth-links a {
  color: #d6728a;
  font-weight: 600;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-links-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.92rem;
}

.auth-links p {
  margin: 0 0 14px !important;
  color: #6b7280 !important;
  font-size: 0.98rem !important;
}

.back-home {
  display: inline-block;
  font-size: 1rem;
}

.login-content {
  width: min(100% - 24px, 512px);
}

.login-content .event-logo {
  width: auto;
  max-width: 100%;
  max-height: 96px;
  margin-bottom: 16px;
}

.login-card {
  padding: 24px;
  border: 1px solid var(--cor-borda, #e5e7eb);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.login-card .auth-title {
  margin-bottom: 20px !important;
  font-size: 1.5rem !important;
  line-height: 2rem;
}

.login-card .auth-form {
  gap: 12px;
}

.login-card .auth-field {
  gap: 4px;
  font-size: 0.875rem;
}

.login-card .remember-me {
  gap: 8px;
  font-size: 0.875rem;
}

.login-card .remember-me input {
  width: 16px;
  height: 16px;
}

.login-card .btn.btn_login {
  margin-top: 16px;
}

.login-card .auth-links {
  margin-top: 12px;
  font-size: 0.75rem;
}

.login-card .auth-links-row {
  margin-bottom: 16px;
  font-size: 0.875rem;
}

.login-card .auth-links p {
  margin-bottom: 12px !important;
  font-size: 0.75rem !important;
}

.login-card .back-home {
  font-size: 0.75rem;
}

.login-content .powered-by {
  margin-top: 32px;
}

.login-content .welcome-copyright {
  margin-top: 12px;
}

.forgot-content {
  width: min(100% - 24px, 512px);
}

.forgot-content .event-logo {
  width: auto;
  max-width: 100%;
  max-height: 96px;
  margin-bottom: 16px;
}

.forgot-card {
  padding: 24px;
  border: 1px solid var(--cor-borda, #e5e7eb);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.forgot-card .auth-title {
  margin-bottom: 8px !important;
  font-size: 1.5rem !important;
  line-height: 2rem;
}

.forgot-card .auth-subtitle {
  margin: 0 0 16px !important;
  color: var(--cor-texto-secundario, #dd7597) !important;
  font-size: 0.875rem !important;
}

.forgot-card .auth-form {
  gap: 12px;
}

.forgot-card .auth-field {
  gap: 4px;
  font-size: 0.875rem;
}

.forgot-card .btn.btn_primary {
  margin-top: 12px;
}

.forgot-card .auth-links-single {
  margin-top: 16px;
}

.forgot-card .back-home {
  font-size: 0.875rem;
}

.forgot-content .powered-by {
  margin-top: 24px;
}

.forgot-content .welcome-copyright {
  margin-top: 12px;
}

@media (max-width: 767px) {
  .login-card {
    padding: 16px;
  }

  .login-card .auth-title {
    margin-bottom: 16px !important;
    font-size: 1.125rem !important;
    line-height: 1.75rem;
  }

  .login-card .auth-form {
    gap: 10px;
  }

  .login-card .auth-field,
  .login-card .remember-me,
  .login-card .auth-links-row {
    font-size: 0.75rem;
  }

  .login-card .btn.btn_login {
    margin-top: 12px;
  }

  .login-content .powered-by {
    margin-top: 24px;
  }

  .forgot-card {
    padding: 16px;
  }

  .forgot-card .auth-title {
    font-size: 1.125rem !important;
    line-height: 1.75rem;
  }

  .forgot-card .auth-subtitle,
  .forgot-card .auth-field,
  .forgot-card .back-home {
    font-size: 0.75rem !important;
  }
}

@media (max-width: 480px) {
  .welcome-content {
    justify-content: center;
    min-height: 100svh;
    box-sizing: border-box;
    padding: 20px 0;
  }

  .event-logo {
    width: min(96%, 400px);
    margin-bottom: 28px;
  }

  .welcome-card {
    padding: 32px 24px 28px;
  }
}

@media (max-height: 760px) {
  .welcome-content {
    padding-block: 16px;
  }

  .event-logo {
    width: min(90%, 360px);
    margin-bottom: 20px;
  }

  .welcome-card {
    padding: 28px 28px 26px;
  }

  .welcome-card h1 {
    font-size: clamp(2rem, 6.5vw, 2.4rem);
  }

  .account-button {
    min-height: 54px;
  }

  .powered-by {
    margin-top: 20px;
  }

  .powered-by img {
    width: 120px;
  }

  .welcome-copyright {
    margin-top: 12px;
  }
}

.register-content {
  width: min(100% - 24px, 672px);
}

.register-content .event-logo {
  width: auto;
  max-width: 100%;
  max-height: 96px;
  margin-bottom: 12px;
}

.register-card {
  position: relative;
  padding: 24px;
  border: 1px solid var(--cor-borda, #e5e7eb);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.register-header {
  margin-bottom: 12px;
  text-align: center;
}

.register-card .auth-title {
  margin: 0 0 4px !important;
  font-size: 1.25rem !important;
  line-height: 1.75rem;
}

.register-card .auth-subtitle {
  margin: 0 !important;
  color: var(--cor-texto-secundario, #dd7597) !important;
  font-size: 0.875rem !important;
}

.register-form {
  gap: 10px;
}

.register-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 768px) {
  .register-grid {
    grid-template-columns: 1fr 1fr;
  }

  .register-span-2 {
    grid-column: 1 / -1;
  }
}

.register-card .auth-field {
  gap: 4px;
  font-size: 0.875rem;
}

.avatar-upload {
  display: flex;
  justify-content: center;
  margin: 4px 0 8px;
}

.avatar-wrapper {
  position: relative;
  display: inline-block;
  line-height: 0;
}

.avatar-preview {
  display: block;
  width: 80px;
  height: 80px;
  overflow: hidden;
  border: 2px solid var(--cor-borda, #e5e7eb);
  border-radius: 999px;
  background: var(--cor-fundo-claro, #f8f9fb);
  cursor: pointer;
}

@media (min-width: 640px) {
  .avatar-preview {
    width: 96px;
    height: 96px;
  }
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-plus {
  position: absolute;
  right: 2px;
  bottom: 2px;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--cor-borda-destaque, #dd7597);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.password-rules {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--cor-borda, #e5e7eb);
  border-radius: 12px;
  background: var(--cor-fundo-claro, #f8f9fb);
  text-align: left;
}

.password-rules-title {
  margin: 0 0 6px !important;
  color: var(--cor-texto-escuro, #1f2837) !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
}

.strength-track {
  height: 8px;
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: 4px;
  background: #e5e7eb;
}

.strength-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease, background 0.3s ease;
  background: transparent;
}

.strength-bar.score-1 {
  background: #ea4335;
}

.strength-bar.score-2 {
  background: linear-gradient(90deg, #ea4335, #ff8c3a);
}

.strength-bar.score-3,
.strength-bar.score-4 {
  background: linear-gradient(90deg, #ea4335, #ff8c3a, #27ae60);
}

.strength-bar.complete {
  background: #27ae60;
}

.password-rules ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.password-rules li {
  color: var(--cor-texto-secundario, #dd7597);
  font-size: 0.75rem;
  line-height: 1.45;
}

.password-rules li.ok {
  color: #3ca105;
}

.terms-box {
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--cor-borda, #e5e7eb);
  border-radius: 12px;
  background: var(--cor-fundo-claro, #f8f9fb);
}

.terms-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--cor-texto-escuro, #1f2837);
  font-size: 0.875rem;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
}

.terms-check input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--cor-destaque, #dd7597);
}

.terms-link {
  display: contents;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cor-destaque, #dd7597);
  font: inherit;
  cursor: pointer;
}

.terms-link:hover {
  text-decoration: underline;
}

.btn.btn_register {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 0.625rem 1.5rem;
  border: none;
  border-radius: 0.75rem;
  background: var(--cor-destaque, #dd7597);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 200ms ease;
}

.btn.btn_register:hover:not(:disabled) {
  background: var(--cor-destaque-hover, #dd8daa);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.btn.btn_register:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.auth-muted {
  color: var(--cor-texto-secundario, #dd7597);
  font-size: 0.75rem;
}

.link_login {
  color: var(--cor-destaque, #dd7597);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
}

.link_login:hover {
  text-decoration: underline;
}

.register-card .auth-links-single {
  margin-top: 12px;
}

.register-content .powered-by {
  margin-top: 24px;
}

.register-content .welcome-copyright {
  margin-top: 12px;
}

.terms-modal {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border: 1px solid var(--cor-borda, #e5e7eb);
  border-radius: 16px;
  overflow: hidden;
}

.terms-modal[style*='display: none'],
.terms-modal[style*='display:none'],
.terms-modal[hidden],
.terms-modal[x-cloak] {
  pointer-events: none !important;
}

.terms-modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  border: 0;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.terms-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  max-height: calc(100% - 8px);
  overflow: auto;
  padding: 28px 24px 24px;
  border: 1px solid var(--cor-borda, #e5e7eb);
  border-radius: 16px;
  background: #fff;
  color: #1f2837;
  text-align: left;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.terms-modal-panel h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.terms-modal-panel p {
  margin: 0 0 16px !important;
  color: #4b5563 !important;
  font-size: 0.9rem !important;
  line-height: 1.5;
}

.terms-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  color: #9ca3af;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}


@media (max-width: 767px) {
  .register-card {
    padding: 16px;
  }

  .register-card .auth-title {
    font-size: 1.125rem !important;
    line-height: 1.75rem;
  }

  .register-card .auth-subtitle,
  .register-card .auth-field,
  .terms-check,
  .auth-muted,
  .link_login {
    font-size: 0.75rem !important;
  }
}
