/* ── Pantallas de acceso: login, recuperar contraseña y elegir contraseña (2026-09-28) ──
   Misma estética que la landing: a la izquierda el formulario en una tarjeta con borde y sombra corrida,
   sobre la cuadrícula crema; a la derecha (solo en pantallas anchas) el panel de marca con el gajo y la
   frase de la landing (verde suave en modo claro, oscuro en modo noche). Botón de confirmar: píldora verde
   con texto blanco. Son pantallas de Lime (antes de ingresar no se sabe la marca de la empresa). */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:  #73A942;
  --cta:      #73A942;
  --cta-text: #FFFFFF;
  --cta-dark: #50762E;
  --lime-vivo: #A6D93D;
  --tinta:    #10140D;
  --crema:    #FBF5EA;
  --borde:    #E5DCC8;
  --texto:    #10140D;
  --gris:     #5C5C57;
  --superficie: #FFFFFF;
  --campo:    #FFFFFF;
  --rejilla:  rgba(16,20,13,.05);
}
html[data-theme="dark"] {
  --crema: #141414; --borde: #333333; --texto: #F2F2F0; --gris: #A3A39E;
  --superficie: #1E1E1E; --campo: #141414; --rejilla: rgba(255,255,255,.035); --cta-dark: #4F8A2B;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--crema);
  color: var(--texto);
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  -webkit-font-smoothing: antialiased;
}

/* ── Columna del formulario ── */
.lado-form {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 88px 24px 40px;
  background-image: linear-gradient(var(--rejilla) 1px, transparent 1px), linear-gradient(90deg, var(--rejilla) 1px, transparent 1px);
  background-size: 44px 44px;
}
.volver {
  position: absolute; top: 22px; left: 24px;
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 18px; letter-spacing: -.02em; color: var(--texto); text-decoration: none;
}
.volver img { width: 26px; height: 26px; }

.card {
  position: relative; z-index: 1;
  background: var(--superficie);
  border: 2px solid var(--tinta);
  border-radius: 26px;
  box-shadow: 8px 8px 0 var(--tinta);
  padding: 40px 36px 32px;
  width: 100%;
  max-width: 410px;
  animation: card-in .35s cubic-bezier(.16,1,.3,1);
}
html[data-theme="dark"] .card { border-color: #3A3A3A; box-shadow: 8px 8px 0 color-mix(in srgb, var(--cta-dark) 70%, transparent); }
@keyframes card-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) { .card { animation: none; } }

.logo { margin-bottom: 26px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gris); }
.eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px rgba(115,169,66,.22); }
.logo h1 { font-family: 'Anton', Impact, sans-serif; font-weight: 400; text-transform: uppercase; font-size: 44px; line-height: .95; margin-top: 12px; letter-spacing: .005em; }
.logo h1 .serif { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; text-transform: none; color: #5E8F32; font-size: 1.08em; }
html[data-theme="dark"] .logo h1 .serif { color: var(--lime-vivo); }
.logo p  { font-size: 14px; color: var(--gris); margin-top: 8px; }

.field { margin-bottom: 16px; }
label  { display: block; font-size: 13px; font-weight: 600; color: var(--texto); margin-bottom: 6px; }

input:not([type="checkbox"]) {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 1.5px solid var(--borde);
  border-radius: 14px;
  font-size: 15px;
  color: var(--texto);
  background: var(--campo);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:not([type="checkbox"]):focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(115,169,66,.18); }
/* iOS hace zoom automático al enfocar un input con font-size < 16px. */
@media (max-width: 860px) { input { font-size: 16px; } }

/* Botón de confirmar: verde con texto blanco, en píldora (mismo criterio que el resto del CRM) */
.btn {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, var(--cta), var(--cta-dark));
  color: var(--cta-text);
  border: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .15s, box-shadow .15s, opacity .15s;
  box-shadow: 0 10px 22px -10px rgba(80,118,46,.6);
}
html[data-theme="dark"] .btn { background: var(--cta-dark); }
.btn:hover   { transform: translateY(-2px); box-shadow: 0 14px 26px -10px rgba(80,118,46,.65); }
.btn:active  { transform: translateY(0); }
.btn:disabled { opacity: .6; cursor: default; transform: none; }

.olvido { text-align: center; margin-top: 16px; }
.olvido a { font-size: 13px; font-weight: 600; color: var(--texto); text-decoration: underline; text-underline-offset: 3px; }

.error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  color: #B91C1C;
  margin-bottom: 16px;
  display: none;
}
html[data-theme="dark"] .error { background: #3A1C1C; border-color: #5E2A2A; color: #FCA5A5; }
.error.show { display: block; }

.footer {
  text-align: center;
  font-size: 12px;
  color: var(--gris);
  margin-top: 26px;
}
@media (max-width: 860px) {
  .footer .version-inline { display: none; }
}

.theme-toggle-float {
  position: fixed; top: 16px; right: 16px; z-index: 5;
  width: 40px; height: 40px; border-radius: 999px;
  border: 1.5px solid var(--borde); background: var(--superficie); color: var(--texto);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; cursor: pointer;
  transition: transform .12s;
}
.theme-toggle-float:hover { transform: translateY(-1px); }

/* ── Panel de marca (como la landing) ── */
/* Claro: verde lima suave con texto tinta. Noche: el panel oscuro de la landing. */
.lado-marca {
  --panel: #E6F0D3; --panel-texto: #10140D; --panel-acento: #4F7A2A; --panel-gris: #3F4A36; --panel-icono: #5E8F32;
  --panel-brillo: rgba(166,217,61,.55);
  position: relative; overflow: hidden;
  background: var(--panel); color: var(--panel-texto);
  border-left: 2px solid #10140D;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 56px 56px 48px;
}
html[data-theme="dark"] .lado-marca {
  --panel: #10140D; --panel-texto: #FFFFFF; --panel-acento: var(--lime-vivo); --panel-gris: rgba(255,255,255,.7); --panel-icono: var(--lime-vivo);
  --panel-brillo: rgba(166,217,61,.45);
  border-left-color: #2A2A2A;
}
.lado-marca::before { content: ''; position: absolute; inset: 0; background: radial-gradient(45% 40% at 60% 55%, var(--panel-brillo), transparent 70%); opacity: .6; pointer-events: none; }
/* line-height 1: con menos, la tilde de "MÁS" se metía en la línea de arriba */
.marca-frase { position: relative; font-family: 'Anton', Impact, sans-serif; text-transform: uppercase; font-size: clamp(44px, 4.6vw, 76px); line-height: 1; max-width: 560px; }
.marca-frase .serif { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; text-transform: none; color: var(--panel-acento); font-size: 1.06em; }
.gajo-escena { position: relative; align-self: center; width: min(360px, 70%); aspect-ratio: 1; margin: 20px 0; perspective: 1000px; }
.gajo-escena .halo { position: absolute; inset: 10%; border-radius: 50%; background: radial-gradient(circle, var(--panel-brillo), transparent 68%); filter: blur(30px); }
.gajo-escena img { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotateX(18deg) rotateZ(-12deg); filter: drop-shadow(0 30px 40px rgba(16,20,13,.35)); animation: flotar 6s ease-in-out infinite; }
@keyframes flotar { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
.burbuja { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 16px; background: #fff; color: #10140D; font-size: 13px; font-weight: 600; line-height: 1.3; box-shadow: 0 18px 40px -14px rgba(16,20,13,.45); border: 1px solid rgba(16,20,13,.08); white-space: nowrap; }
.burbuja small { display: block; font-weight: 500; font-size: 11.5px; color: #5C5C57; }
.burbuja i { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; color: #fff; flex-shrink: 0; }
.b1 { top: 8%; left: -18%; } .b1 i { background: #25D366; }
.b2 { bottom: 10%; right: -16%; } .b2 i { background: #10140D; color: var(--lime-vivo); }
.marca-pie { position: relative; display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; font-weight: 600; color: var(--panel-gris); }
.marca-pie span { display: inline-flex; align-items: center; gap: 6px; }
.marca-pie i { color: var(--panel-icono); font-size: 17px; }
@media (prefers-reduced-motion: reduce) { .gajo-escena img { animation: none; } }

/* Celular y ventanas angostas: solo el formulario (el panel de marca sería puro scroll antes de ingresar) */
@media (max-width: 900px) {
  body { grid-template-columns: 1fr; }
  .lado-marca { display: none; }
  .lado-form { min-height: 100vh; }
  .card { box-shadow: 5px 5px 0 var(--tinta); padding: 32px 24px 26px; }
  .logo h1 { font-size: 38px; }
}

/* ── Mensajes (recuperar y elegir contraseña) ── */
.msg { border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px; display: none; line-height: 1.5; }
.msg.show { display: block; }
.msg.error { background: #FEF2F2; border: 1px solid #FECACA; color: #B91C1C; }
.msg.ok    { background: #F0FDF4; border: 1px solid #BBF7D0; color: #166534; }
html[data-theme="dark"] .msg.error { background: #3A1C1C; border-color: #5E2A2A; color: #FCA5A5; }
html[data-theme="dark"] .msg.ok    { background: #17301F; border-color: #245236; color: #86EFAC; }
.hint { font-size: 12px; color: var(--gris); margin-top: 6px; line-height: 1.45; }
/* Casilla de aceptar términos: fuera del estilo de los campos de texto */
input[type="checkbox"] { width: 18px; height: 18px; padding: 0; accent-color: var(--cta-dark); box-shadow: none; flex-shrink: 0; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; cursor: pointer; line-height: 1.45; }
.check a { color: var(--texto); font-weight: 600; }
.footer a { color: inherit; }
.pie-links { text-align: center; margin-top: 16px; font-size: 13px; }
.pie-links a { font-weight: 600; color: var(--texto); text-decoration: underline; text-underline-offset: 3px; }
.app-version-tag { position: fixed; left: 10px; bottom: 6px; font-size: 11px; color: var(--gris); padding: 2px 6px; z-index: 50; }
