/* Login page — estilo alinhado ao componente React (ControlPro / landing tokens) */
:root {
  --color-primary: #1a2332;
  --color-secondary: #2d4f5e;
  --color-accent: #d4a574;
  --color-gray-light: #e8e8e8;
  --color-white: #fff;
  --color-error: #ff4757;
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html.login-page-root {
  height: 100%;
}

body.login-page-body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-family);
  background: var(--color-primary);
  color: #334155;
  overflow-x: hidden;
}

.login-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

/* Fundo animado — citações */
.bg-animation {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(
    165deg,
    #1a2332 0%,
    #243447 40%,
    #1e2d3d 100%
  );
}

.bg-animation .quote {
  pointer-events: auto;
  position: absolute;
  max-width: min(300px, 32vw);
  padding-top: 12px;
  user-select: none;
  cursor: default;
  animation: floatQuote linear forwards;
  will-change: transform, opacity;
  filter: drop-shadow(0 6px 16px rgba(15, 23, 42, 0.18));
}

/* Bolha em formato de nuvem */
.bg-animation .quote-bubble {
  position: relative;
  display: block;
  padding: 0;
  font-size: clamp(11px, 1.3vw, 13px);
  line-height: 1.5;
  font-style: italic;
  text-align: center;
  color: #475569;
  isolation: isolate;
  /* corpo principal da nuvem */
  border-radius: 52% 48% 48% 52% / 58% 55% 45% 42%;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(248, 250, 252, 0.96) 40%,
    rgba(236, 242, 249, 0.94) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.75) inset,
    0 10px 32px rgba(15, 23, 42, 0.14),
    0 3px 10px rgba(15, 23, 42, 0.08);
}

.bg-animation .quote-bubble-text {
  position: relative;
  z-index: 2;
  display: block;
  padding: 16px 20px 18px;
}

/* pufes da nuvem (acima do corpo, visíveis) */
.bg-animation .quote-bubble::before,
.bg-animation .quote-bubble::after {
  content: "";
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  background: linear-gradient(
    200deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(248, 250, 252, 0.94) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.bg-animation .quote-bubble::before {
  width: 32px;
  height: 32px;
  top: -14px;
  left: 12px;
}

.bg-animation .quote-bubble::after {
  width: 22px;
  height: 22px;
  top: -10px;
  right: 16px;
  box-shadow:
    24px 6px 0 -2px rgba(255, 255, 255, 0.95),
    24px 6px 8px rgba(15, 23, 42, 0.06);
}

.bg-animation .quote.dragging {
  cursor: grabbing;
  z-index: 5;
  opacity: 0.85 !important;
}

.bg-animation .quote.selected {
  z-index: 4;
}

@keyframes floatQuote {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  6% {
    opacity: 0.42;
  }
  94% {
    opacity: 0.35;
  }
  100% {
    transform: translateY(-115vh) translateX(var(--drift, 0px));
    opacity: 0;
  }
}

/* Card central */
.login-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 16px;
  padding: 36px 32px 28px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.logo-container {
  text-align: center;
  margin-bottom: 28px;
}

.logo-container .logo img {
  max-width: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 16px;
}

.logo-container h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.logo-container .subtitle {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0;
}

/* Erros */
.error-message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
  background: rgba(255, 71, 87, 0.08);
  border: 1px solid rgba(255, 71, 87, 0.25);
  border-radius: 10px;
  color: #c0392b;
  font-size: 0.875rem;
  line-height: 1.4;
}

.error-message i {
  margin-top: 2px;
  flex-shrink: 0;
}

/* Campos */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
  transition: color 0.2s;
}

.form-group.focused label {
  color: var(--color-accent);
}

.input-container {
  position: relative;
}

.input-container input {
  width: 100%;
  padding: 14px 14px 14px 44px;
  font-size: 0.95rem;
  border: 1px solid var(--color-gray-light);
  border-radius: 10px;
  background: #fafafa;
  color: #1e293b;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-container input::placeholder {
  color: #94a3b8;
}

.input-container input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.2);
  background: #fff;
}

.form-group.focused .input-container input {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.15);
}

.input-container .input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.95rem;
  pointer-events: none;
}

.form-group.focused .input-container .input-icon {
  color: var(--color-accent);
}

.login-forgot {
  text-align: right;
  margin-bottom: 16px;
}

.login-forgot a {
  color: var(--color-accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.login-forgot a:hover {
  text-decoration: underline;
}

.login-forgot i {
  margin-right: 4px;
  opacity: 0.9;
}

.login-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary);
  background: linear-gradient(135deg, #e8c9a8 0%, var(--color-accent) 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  box-shadow: 0 2px 12px rgba(212, 165, 116, 0.35);
}

.login-btn:hover:not(:disabled) {
  opacity: 0.95;
  transform: translateY(-1px);
}

.login-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.contact-link {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--color-gray-light);
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
}

.contact-link p {
  margin: 0 0 8px;
}

.contact-link a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
}

.contact-link a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .login-container {
    padding: 28px 22px 22px;
  }

  .bg-animation .quote {
    max-width: 46vw;
  }

  .bg-animation .quote-bubble-text {
    font-size: 10px;
    padding: 12px 12px 14px;
  }

  .bg-animation .quote-bubble::before {
    width: 26px;
    height: 26px;
    top: -11px;
  }

  .bg-animation .quote-bubble::after {
    width: 18px;
    height: 18px;
    top: -8px;
  }
}
