/* Variáveis (cor + fonte) — espelham o site perseu.ai */
:root {
  --login-cream: #FDFBF8;
  --login-charcoal: #1E1A17;
  --login-text-on-cream: #1E1A17;
  --login-text-secondary: #4A4540;
  --login-border-subtle: rgba(30, 26, 23, 0.15);
  --login-orange: #F36A41;
  --login-error: #B91C1C;
  --login-back-link: #C8B49A;
  --login-back-link-mobile: rgba(253, 251, 248, 0.45);
  --login-font-sans: 'Poppins', system-ui, -apple-system, sans-serif;
  --login-font-serif: 'Lora', Georgia, serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--login-font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--login-text-on-cream);
  background-color: var(--login-cream);
  -webkit-font-smoothing: antialiased;
}

.login-container {
  display: flex;
  min-height: 100vh;
}

/* Painel esquerdo (cream) */
.login-left {
  width: 45%;
  background-color: var(--login-cream);
  flex-direction: column;
  padding: 40px 48px;
  display: flex;
}

.login-logo-wrap a {
  text-decoration: none;
}

/* Logo: mesma proporção do MVP (referência: top bar do index.html) */
.login-logo {
  height: 28px;
  object-fit: contain;
  display: block;
}

.login-greeting {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 48px;
  padding-bottom: 48px;
}

.login-greeting h1 {
  font-family: var(--login-font-serif);
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--login-text-on-cream);
  margin: 0 0 20px 0;
}

.login-greeting p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--login-text-secondary);
  max-width: 380px;
  margin: 0;
}

.login-back a {
  font-size: 13px;
  color: var(--login-back-link);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.login-back a:hover {
  opacity: 0.7;
}

/* Painel direito (charcoal) */
.login-right {
  flex: 1;
  background-color: var(--login-charcoal);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.login-card {
  background-color: var(--login-cream);
  border-radius: 10px;
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
}

.login-card-header {
  margin-bottom: 20px;
}

.login-card-header h2 {
  font-family: var(--login-font-serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--login-text-on-cream);
  margin: 0 0 4px 0;
}

.login-card-header p {
  font-size: 13px;
  color: var(--login-text-secondary);
  margin: 0;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.login-field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--login-text-secondary);
}

.login-field input {
  height: 44px;
  padding: 0 12px;
  background-color: var(--login-cream);
  border: 1px solid var(--login-border-subtle);
  border-radius: 6px;
  font-size: 14px;
  font-family: var(--login-font-sans);
  color: var(--login-text-on-cream);
  outline: none;
  width: 100%;
  transition: border-color 0.15s ease;
}

.login-field input:focus {
  border-color: var(--login-orange);
}

.login-field input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.login-error {
  font-size: 13px;
  color: var(--login-error);
  margin-bottom: 12px;
}

.login-button {
  width: 100%;
  height: 48px;
  background-color: var(--login-charcoal);
  color: var(--login-cream);
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  border: none;
  cursor: pointer;
  font-family: var(--login-font-sans);
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.login-button:hover:not(:disabled) {
  opacity: 0.85;
}

.login-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-button-dots {
  display: none;
  align-items: center;
  gap: 5px;
}

.login-button.loading .login-button-text {
  display: none;
}

.login-button.loading .login-button-dots {
  display: flex;
}

.login-button-dots .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--login-cream);
  animation: login-dot-pulse 1.4s ease-in-out infinite;
}

.login-button-dots .dot:nth-child(2) { animation-delay: 0.22s; }
.login-button-dots .dot:nth-child(3) { animation-delay: 0.44s; }

@keyframes login-dot-pulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.75); }
  40%           { opacity: 1; transform: scale(1); }
}

/* Mobile (< 768px) — esconde painel esquerdo, mostra logo + card no painel direito */
.login-mobile-logo,
.login-mobile-back {
  display: none;
}

@media (max-width: 768px) {
  .login-left {
    display: none;
  }
  .login-mobile-logo {
    display: block;
    margin-bottom: 32px;
    width: 100%;
    max-width: 420px;
  }
  .login-mobile-back {
    display: block;
    margin-top: 24px;
  }
  .login-mobile-back a {
    font-size: 13px;
    color: var(--login-back-link-mobile);
    text-decoration: none;
  }
  .login-right {
    flex: 1;
    width: 100%;
  }
}
