/* Rutaflow sign-in — Plus Jakarta + teal / indigo (matches product UI) */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --teal: #1BBCAC;
  --teal-dark: #127A6E;
  --teal-mid: #1A9E8F;
  --blue: #2563EB;
  --text: #1A2332;
  --muted: #6B7C93;
  --border: #E2E8F0;
  --bg: #F0F4F8;
  --white: #FFFFFF;
  --error: #E53E3E;
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg);
  font-family: var(--font);
}

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

.left {
  width: min(460px, 100%);
  flex-shrink: 0;
  background: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 44px 28px;
  box-shadow: 4px 0 40px rgba(0, 0, 0, 0.07);
  z-index: 2;
  animation: slideLeft 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideLeft {
  from { transform: translateX(-24px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.logo-wrap { margin-bottom: 8px; }
.logo-wrap img { height: 96px; width: auto; object-fit: contain; display: block; }

.form-area { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 8px 0 16px; }

.form-heading { margin-bottom: 28px; animation: fadeUp 0.5s 0.1s both; }
.form-heading h1 { font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; margin: 0; }
.form-heading p { margin: 8px 0 0; font-size: 14px; color: var(--muted); }

@keyframes fadeUp {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.rf-field { margin-bottom: 18px; animation: fadeUp 0.5s 0.18s both; }
.rf-field + .rf-field { animation-delay: 0.24s; }

.rf-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}

.iw { position: relative; }
.iw .ico {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #A0AEC0;
  pointer-events: none;
  font-size: 15px;
}
.iw:focus-within .ico { color: var(--teal-mid); }

.iw input {
  width: 100%;
  background: #F8FAFC;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 13px 44px 13px 42px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.iw input::placeholder { color: #A0AEC0; }
.iw input:focus {
  border-color: var(--teal-mid);
  box-shadow: 0 0 0 3px rgba(26, 158, 143, 0.12);
  background: var(--white);
}
.iw input.rf-err {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #A0AEC0;
  padding: 4px;
  transition: color 0.2s;
}
.eye-btn:hover { color: var(--teal-mid); }

.forgot-row {
  display: flex;
  justify-content: flex-end;
  margin: -2px 0 20px;
  animation: fadeUp 0.5s 0.3s both;
}
.forgot-row a {
  font-size: 13px;
  color: var(--teal-mid);
  text-decoration: none;
  font-weight: 500;
}
.forgot-row a:hover { color: var(--teal-dark); text-decoration: underline; }

.cta {
  width: 100%;
  background: linear-gradient(135deg, #1BBCAC 0%, #1A9E8F 50%, #127A6E 100%);
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
  animation: fadeUp 0.5s 0.34s both;
  box-shadow: 0 4px 20px rgba(26, 158, 143, 0.35);
}
.cta:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 28px rgba(26, 158, 143, 0.45);
  transform: translateY(-1px);
}
.cta:active { transform: translateY(0); }

.contact-row {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
  animation: fadeUp 0.5s 0.4s both;
}
.contact-row a { color: var(--teal-mid); text-decoration: none; font-weight: 600; }
.contact-row a:hover { color: var(--teal-dark); }

.form-footer {
  font-size: 11px;
  color: #A0AEC0;
  text-align: center;
  animation: fadeUp 0.5s 0.45s both;
  margin-top: 8px;
}

.error-message {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 20px;
  text-align: center;
  animation: fadeUp 0.45s both;
}

/* Right panel — SVG animado + tagline + pills (spec diseño) */
.right {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #0D1B2A 0%, #1A2E45 40%, #0F2235 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 32px;
  animation: rf-fadeIn 0.7s 0.1s both;
}

@keyframes rf-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.right::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(27, 188, 172, 0.18) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

.rf-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.rf-blob-1 { width: 360px; height: 360px; background: rgba(27, 188, 172, 0.09); top: -80px; right: -60px; animation: rf-d1 14s ease-in-out infinite; }
.rf-blob-2 { width: 280px; height: 280px; background: rgba(37, 99, 235, 0.08); bottom: -60px; left: -40px; animation: rf-d2 18s ease-in-out infinite; }
.rf-blob-3 { width: 200px; height: 200px; background: rgba(27, 188, 172, 0.06); top: 45%; left: 10%; animation: rf-d3 11s ease-in-out infinite; }

@keyframes rf-d1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, 40px); }
}
@keyframes rf-d2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, -30px); }
}
@keyframes rf-d3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -20px); }
}

.rf-tagline {
  text-align: center;
  margin-bottom: 28px;
  position: relative;
  z-index: 2;
  animation: rf-fadeUp 0.6s 0.4s both;
}
.rf-tagline h2 {
  font-family: var(--font);
  font-size: clamp(22px, 2.8vw, 34px);
  font-weight: 800;
  color: #F0EDE8;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}
.rf-tagline h2 em {
  font-style: normal;
  color: #1BBCAC !important;
}

@keyframes rf-fadeUp {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.rf-illustration {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 620px;
}
.rf-map-scene {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.4));
  animation: rf-sceneIn 0.8s 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes rf-sceneIn {
  from { transform: translateY(20px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.rf-phone-float {
  animation: rf-floatPhone 4s ease-in-out infinite;
}

@keyframes rf-floatPhone {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.rf-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
  margin-top: 24px;
  position: relative;
  z-index: 2;
  animation: rf-fadeUp 0.6s 0.8s both;
}
.rf-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 5px 11px;
  font-family: var(--font);
  font-size: 11px;
  color: rgba(240, 237, 232, 0.7);
  font-weight: 500;
  backdrop-filter: blur(8px);
  cursor: default;
  transition: background 0.4s, border-color 0.4s, color 0.4s, box-shadow 0.4s;
}
.rf-pill.lit {
  background: #1BBCAC !important;
  border-color: #1BBCAC !important;
  color: #0A1520 !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 16px rgba(27, 188, 172, 0.4) !important;
}
.rf-pill.lit svg { stroke: #0A1520 !important; }

.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;
}

/* Language selector — top bar */
.lang-rf {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  padding: 8px 12px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}
.lang-rf select {
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  outline: none;
  font-family: var(--font);
}

@media (max-width: 860px) {
  .right { display: none; }
  .left { width: 100%; box-shadow: none; min-height: 100vh; }
}
