/* Login TOKKA — Pulse / Lovable (tela cheia escura) */

body.login-page {
  --tk-bg: #0a0a0a;
  --tk-surface: #1a1a1a;
  --tk-ink: #ffffff;
  --tk-border: rgba(255, 255, 255, 0.12);
  --tk-muted: rgba(255, 255, 255, 0.55);
  background: #0a0a0a;
  min-height: 100dvh;
  color: #f2f2f2;
  color-scheme: dark;
}

body.login-page main {
  max-width: none;
  margin: 0;
  padding: 0;
}

body.login-page .messages {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 40;
  max-width: 440px;
  margin: 0 auto;
}

.login-screen {
  position: relative;
  min-height: 100dvh;
  isolation: isolate;
  overflow: hidden;
  animation: login-fade-in 0.45s ease-out;
}

@keyframes login-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .login-screen { animation: none; }
  .login-submit,
  .login-field input,
  .login-forgot,
  .login-signup a,
  .login-guest a,
  .login-social-btn {
    transition: none !important;
  }
}

.login-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #0a0a0a;
  background-image: var(--login-hero-image);
  background-size: cover;
  background-position: center 30%;
  transform: scale(1.04);
  filter: blur(2px);
}

.login-bg-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 8, 8, 0.72) 0%, rgba(8, 8, 8, 0.55) 28%, rgba(8, 8, 8, 0.78) 62%, rgba(8, 8, 8, 0.94) 100%),
    radial-gradient(120% 70% at 50% 0%, rgba(255, 119, 0, 0.18), transparent 55%);
}

.login-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 20px calc(28px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

.login-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
}

.login-logo {
  display: block;
  height: 28px;
  width: auto;
}

.login-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 18, 18, 0.72);
  color: rgba(255, 255, 255, 0.88);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.login-badge svg {
  width: 13px;
  height: 13px;
  color: #ff7700;
  stroke: #ff7700;
}

.login-hero-copy {
  margin-bottom: 28px;
}

.login-eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ff7700;
}

.login-headline {
  margin: 0 0 12px;
  font-size: clamp(1.85rem, 7vw, 2.35rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #fff;
}

.login-headline em {
  font-style: normal;
  color: #ff7700;
}

.login-sub {
  margin: 0;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.58);
}

.login-form {
  display: flex;
  flex-direction: column;
}

.login-label {
  display: block;
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.login-label + .login-field + .login-label {
  margin-top: 14px;
}

.login-field {
  position: relative;
  display: flex;
  align-items: center;
}

.login-field-icon {
  position: absolute;
  left: 16px;
  width: 17px;
  height: 17px;
  color: rgba(255, 255, 255, 0.55);
  stroke: rgba(255, 255, 255, 0.55);
  pointer-events: none;
  z-index: 2;
}

.login-field input {
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 12px 16px 12px 46px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: #1a1a1a !important;
  color: #fff !important;
  caret-color: #ff7700;
  font: inherit;
  font-size: 15px;
  transition: border-color 0.18s ease;
  box-sizing: border-box;
  box-shadow: none !important;
  -webkit-text-fill-color: #fff;
}

.login-field--password input {
  padding-left: 16px;
  padding-right: 48px;
}

.login-field input::placeholder {
  color: rgba(255, 255, 255, 0.28);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.28);
}

.login-field input:focus {
  outline: none;
  border-color: #ff7700;
  box-shadow: none !important;
}

/* Chrome/Safari autofill pinta de branco — forçar escuro */
body.login-page .login-field input:-webkit-autofill,
body.login-page .login-field input:-webkit-autofill:hover,
body.login-page .login-field input:-webkit-autofill:focus,
body.login-page .login-field input:-webkit-autofill:active {
  -webkit-text-fill-color: #fff !important;
  caret-color: #ff7700;
  box-shadow: 0 0 0 1000px #1a1a1a inset !important;
  transition: background-color 99999s ease-in-out 0s;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

body.login-page .login-field input:-webkit-autofill:focus {
  border-color: #ff7700;
}

.login-field .password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
}

.login-field .password-toggle:hover {
  color: #fff;
}

.login-field .password-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.login-forgot {
  display: block;
  align-self: flex-end;
  margin: 10px 2px 0;
  color: #ff7700;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.login-forgot:hover {
  text-decoration: underline;
}

.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff7a00 0%, #ffb400 100%);
  color: #0a0a0a;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.18s ease, transform 0.18s ease;
}

.login-submit:hover {
  filter: brightness(1.05);
}

.login-submit:active {
  transform: scale(0.985);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.login-social {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 22px;
}

.login-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 18, 18, 0.85);
  color: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: not-allowed;
  opacity: 0.9;
}

.login-google-icon {
  flex-shrink: 0;
  display: block;
}

.login-social-btn svg:not(.login-google-icon) {
  width: 16px;
  height: 16px;
  color: #ff7700;
  stroke: #ff7700;
}

.login-signup,
.login-guest {
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.4;
}

.login-signup {
  margin-bottom: 12px;
}

.login-signup a {
  margin-left: 4px;
  color: #ff7700;
  font-weight: 800;
  text-decoration: none;
}

.login-guest a {
  margin-left: 4px;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.login-signup a:hover,
.login-guest a:hover {
  text-decoration: underline;
}

/* —— Fluxo criar conta / confirmar e-mail / definir senha —— */
.auth-flow .login-inner {
  justify-content: center;
  gap: 18px;
}

.auth-card {
  width: 100%;
  padding: 22px 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(22, 22, 22, 0.92);
  backdrop-filter: blur(10px);
  box-sizing: border-box;
}

.auth-card-logo {
  margin-bottom: 18px;
}

.auth-title {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
}

.auth-lead {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.58);
}

.auth-lead strong.auth-email,
.auth-email {
  color: #fff;
  font-weight: 700;
  word-break: break-all;
}

.auth-hint {
  margin: 6px 2px 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

.auth-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.auth-note svg {
  width: 14px;
  height: 14px;
  color: #4ade80;
  stroke: #4ade80;
  flex-shrink: 0;
}

.auth-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 0 14px;
  border-radius: 999px;
  background: rgba(255, 119, 0, 0.12);
  border: 1px solid rgba(255, 119, 0, 0.28);
  color: #ff7a00;
}

.auth-icon-wrap svg {
  width: 22px;
  height: 22px;
}

.auth-resend-box {
  margin: 0 0 16px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 10, 10, 0.55);
}

.auth-resend-box p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.55);
}

.auth-resend-form {
  margin: 0;
}

.auth-resend-btn {
  border: 0;
  background: transparent;
  padding: 0;
  color: #ff7a00;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.auth-resend-btn:hover {
  text-decoration: underline;
}

.auth-submit-link {
  text-decoration: none;
  box-sizing: border-box;
}

.auth-secondary-link {
  margin: 14px 0 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

.auth-secondary-link a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-secondary-link--spaced {
  margin-top: 18px;
}

.auth-secondary-link--spaced a {
  color: #ff7a00;
  text-decoration: none;
}

.auth-secondary-link--spaced a:hover {
  text-decoration: underline;
}

.auth-field-error {
  margin: 6px 2px 0;
  font-size: 12px;
  color: #f87171;
}

.auth-rules {
  list-style: none;
  margin: 10px 0 16px;
  padding: 0;
  display: grid;
  gap: 6px;
}

.auth-rules li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.auth-rules li svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.auth-rules li.is-ok {
  color: #4ade80;
}

.auth-rules li.is-ok svg {
  color: #4ade80;
  stroke: #4ade80;
}

.auth-rules li.is-bad {
  color: rgba(255, 255, 255, 0.55);
}

.auth-flow .login-field--password input {
  padding-left: 46px;
}

.auth-flow .login-guest {
  margin-top: 4px;
}

@media (min-width: 768px) {
  .login-inner {
    padding-top: 28px;
    padding-bottom: 40px;
    justify-content: center;
  }

  .login-top {
    margin-bottom: 36px;
  }

  .login-hero-copy {
    margin-bottom: 32px;
  }

  .login-logo {
    height: 32px;
  }

  .auth-card {
    padding: 28px 24px 24px;
  }
}
