/* rest/login/_login.css — Simple + Dopamine */

.lg-body {
  margin: 0;
  background: #f6f8fc;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  color: #0f172a;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   Fondo dopaminico — orbes circulares moviendose despacito
   Mezcla 2 capas: orbes "ambient" (blur grande) + esferas 3D (sharp)
   ============================================================ */
.dp-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 0%, #ffffff 0%, #eef3fb 60%, #e8effa 100%);
}

.dp-orb {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
  animation: dp-drift 70s ease-in-out infinite alternate;
}

/* Capa 1 — Orbes ambient (glow grande, blurred) */
.dp-orb--blue {
  width: 520px; height: 520px;
  left: -120px; top: -140px;
  background: radial-gradient(circle, #60a5fa 0%, transparent 70%);
  filter: blur(70px);
  opacity: .55;
  animation-duration: 80s;
}
.dp-orb--cyan {
  width: 460px; height: 460px;
  right: -100px; top: 4%;
  background: radial-gradient(circle, #67e8f9 0%, transparent 70%);
  filter: blur(70px);
  opacity: .5;
  animation-delay: -12s;
  animation-duration: 95s;
}
.dp-orb--mint {
  width: 320px; height: 320px;
  left: 52%; top: 40%;
  background: radial-gradient(circle, #86efac 0%, transparent 70%);
  filter: blur(70px);
  opacity: .38;
  animation-delay: -45s;
  animation-duration: 110s;
}

/* Capa 2 — Esferas 3D (highlight arriba-izq + sombra abajo-der) */
.dp-orb--pink {
  width: 220px; height: 220px;
  left: 8%; bottom: 6%;
  background:
    radial-gradient(circle at 32% 28%, #ffffff 0%, #fbcfe8 18%, #f472b6 55%, #db2777 100%);
  box-shadow:
    0 30px 60px -18px rgba(219, 39, 119, .45),
    inset -16px -22px 40px rgba(190, 24, 93, .35),
    inset 12px 14px 28px rgba(255, 255, 255, .55);
  opacity: .9;
  animation-duration: 85s;
  animation-delay: -25s;
}
.dp-orb--sun {
  width: 280px; height: 280px;
  right: 6%; bottom: -50px;
  background:
    radial-gradient(circle at 30% 28%, #ffffff 0%, #fed7aa 16%, #fb923c 55%, #ea580c 100%);
  box-shadow:
    0 36px 70px -20px rgba(234, 88, 12, .5),
    inset -18px -26px 46px rgba(194, 65, 12, .35),
    inset 14px 16px 32px rgba(255, 255, 255, .55);
  opacity: .92;
  animation-duration: 75s;
  animation-delay: -40s;
}
.dp-orb--lilac {
  width: 220px; height: 220px;
  right: 26%; top: 8%;
  background:
    /* capa 1 — highlight especular arriba-izq */
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .65) 0%, transparent 38%),
    /* capa 2 — logo del cliente como reflejo */
    var(--orb-logo) center / 60% auto no-repeat,
    /* capa 3 — base esfera */
    radial-gradient(circle at 30% 30%, #ffffff 0%, #dbeafe 18%, #60a5fa 55%, #1d4ed8 100%);
  background-blend-mode: screen, overlay, normal;
  box-shadow:
    0 30px 60px -18px rgba(29, 78, 216, .5),
    inset -16px -22px 40px rgba(30, 64, 175, .4),
    inset 12px 14px 28px rgba(255, 255, 255, .55);
  opacity: .95;
  animation-duration: 90s;
  animation-delay: -20s;
}

/* Esferas extra (variedad) */
.dp-orb--cherry {
  width: 120px; height: 120px;
  left: 38%; bottom: 14%;
  background:
    radial-gradient(circle at 32% 28%, #ffffff 0%, #fecaca 16%, #ef4444 55%, #b91c1c 100%);
  box-shadow:
    0 18px 40px -14px rgba(185, 28, 28, .42),
    inset -10px -14px 24px rgba(153, 27, 27, .3),
    inset 8px 10px 18px rgba(255, 255, 255, .55);
  opacity: .85;
  animation-duration: 100s;
  animation-delay: -55s;
}
.dp-orb--teal {
  width: 100px; height: 100px;
  left: 70%; bottom: 24%;
  background:
    radial-gradient(circle at 32% 28%, #ffffff 0%, #99f6e4 16%, #2dd4bf 55%, #0f766e 100%);
  box-shadow:
    0 16px 36px -12px rgba(15, 118, 110, .42),
    inset -8px -12px 22px rgba(17, 94, 89, .32),
    inset 6px 8px 16px rgba(255, 255, 255, .55);
  opacity: .85;
  animation-duration: 115s;
  animation-delay: -15s;
}

@keyframes dp-drift {
  0%   { transform: translate(0, 0) scale(1) rotate(0); }
  25%  { transform: translate(40px, -30px) scale(1.06) rotate(6deg); }
  50%  { transform: translate(-30px, 50px) scale(.96) rotate(-5deg); }
  75%  { transform: translate(50px, 20px) scale(1.03) rotate(3deg); }
  100% { transform: translate(-40px, -40px) scale(1.08) rotate(-2deg); }
}

@media (prefers-reduced-motion: reduce) {
  .dp-orb { animation: none; }
}

@media (max-width: 700px) {
  .dp-orb--cherry, .dp-orb--teal { display: none; }
  .dp-orb--lilac { width: 110px; height: 110px; }
}

/* ============================================================
   Layout — wrap centrado
   ============================================================ */
.lg-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.lg-stack {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

/* ============================================================
   Logo suelto — sin caja, flotando arriba
   ============================================================ */
.lg-logo-loose {
  height: 120px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  animation: lg-logo-float 6s ease-in-out infinite;
  filter:
    drop-shadow(0 12px 24px rgba(25, 118, 210, .18))
    drop-shadow(0 4px 8px rgba(15, 23, 42, .08));
  transition: transform .25s ease;
  cursor: pointer;
}
.lg-logo-loose:hover { transform: scale(1.05); }

@keyframes lg-logo-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
  .lg-logo-loose { animation: none; }
}

/* ============================================================
   Card simple
   ============================================================ */
.lg-card {
  width: 100%;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 20px;
  padding: 32px 30px 26px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, .04),
    0 18px 50px rgba(15, 23, 42, .1),
    0 1px 0 rgba(255, 255, 255, .9) inset;
}

.lg-field { margin-bottom: 14px; }
.lg-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  letter-spacing: .02em;
}
.lg-inputwrap { position: relative; }
.lg-inputwrap .lg-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 16px;
  pointer-events: none;
  transition: color .15s ease;
  z-index: 3;
  display: inline-block !important;
  width: auto !important;
  height: auto !important;
  line-height: 1 !important;
  font-family: "FontAwesome" !important;
}
.lg-input {
  width: 100% !important;
  height: 46px !important;
  box-sizing: border-box !important;
  padding: 0 44px 0 40px !important;
  margin: 0 !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 11px !important;
  font-size: 14px !important;
  color: #0f172a !important;
  outline: none !important;
  font-family: inherit !important;
  line-height: normal !important;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.lg-input::placeholder { color: #94a3b8; }
.lg-input:focus {
  border-color: #1976d2 !important;
  box-shadow: 0 0 0 4px rgba(25, 118, 210, .12) !important;
}
.lg-inputwrap:focus-within .lg-icon { color: #1976d2; }

/* Toggle ojo en password */
.lg-eye {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  border-radius: 8px;
  padding: 0;
  transition: color .15s ease, background .15s ease;
  z-index: 3;
}
.lg-eye:hover { color: #1976d2; background: rgba(25, 118, 210, .08); }
.lg-eye:focus { outline: none; color: #1976d2; }
.lg-eye .fa { line-height: 1; }

.lg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.lg-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  user-select: none;
  margin: 0;
  font-weight: 500;
}
.lg-check input[type=checkbox] {
  width: 16px; height: 16px;
  accent-color: #1976d2;
  cursor: pointer;
  margin: 0;
}

.lg-btn {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  color: #fff;
  background: linear-gradient(135deg, #1976d2 0%, #29b6f6 100%);
  box-shadow:
    0 8px 22px rgba(25, 118, 210, .35),
    0 2px 6px rgba(25, 118, 210, .2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform .12s ease, box-shadow .15s ease, filter .15s ease;
  position: relative;
  overflow: hidden;
}
.lg-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .6s ease;
}
.lg-btn:hover {
  filter: brightness(1.04);
  box-shadow:
    0 12px 28px rgba(25, 118, 210, .45),
    0 3px 8px rgba(25, 118, 210, .25);
  transform: translateY(-1px);
}
.lg-btn:hover::before { transform: translateX(120%); }
.lg-btn:active { transform: translateY(0); }
.lg-btn:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
  filter: none;
}
.lg-btn .fa { font-size: 13px; }

.lg-foot {
  margin-top: 20px;
  text-align: center;
  font-size: 10px;
  letter-spacing: .08em;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 600;
}

@media (max-width: 480px) {
  .lg-stack { max-width: 100%; gap: 18px; }
  .lg-logo-loose { height: 88px; }
  .lg-card { padding: 26px 22px 22px; border-radius: 18px; }
}
