/* =========================================================
   LA MOTORA MOTORS
   LOGIN PREMIUM
========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --dark: #080c12;
  --dark-soft: #101722;
  --text: #111827;
  --text-soft: #64748b;
  --border: #e2e8f0;
  --white: #ffffff;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  background: #f8fafc;
  color: var(--text);

  -webkit-font-smoothing: antialiased;
}

/* =========================================================
   CONTENEDOR PRINCIPAL
========================================================= */

.login-page {
  min-height: 100vh;
  width: 100%;

  display: grid;
  grid-template-columns: 1.08fr 0.92fr;

  overflow: hidden;
}

/* =========================================================
   PANEL DE MARCA
========================================================= */

.brand-panel {
  position: relative;

  min-height: 100vh;

  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(37, 99, 235, 0.25),
      transparent 35%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(14, 165, 233, 0.13),
      transparent 35%
    ),
    linear-gradient(145deg, #070b10 0%, #0d131c 50%, #101a29 100%);

  color: white;

  display: flex;
  flex-direction: column;

  padding: 55px 70px;

  overflow: hidden;
}

/* Decoración */

.brand-panel::before {
  content: "";

  position: absolute;

  width: 520px;
  height: 520px;

  border-radius: 50%;

  border: 1px solid rgba(255, 255, 255, 0.055);

  top: -180px;
  right: -180px;
}

.brand-panel::after {
  content: "";

  position: absolute;

  width: 420px;
  height: 420px;

  border-radius: 50%;

  border: 1px solid rgba(37, 99, 235, 0.15);

  bottom: -180px;
  left: -150px;
}

/* Overlay */

.brand-overlay {
  position: absolute;
  inset: 0;

  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(37, 99, 235, 0.025) 50%,
    transparent 100%
  );

  pointer-events: none;
}

/* =========================================================
   CONTENIDO MARCA
========================================================= */

.brand-content {
  position: relative;
  z-index: 2;

  height: 100%;

  display: flex;
  flex-direction: column;
}

/* =========================================================
   PARTE SUPERIOR
========================================================= */

.brand-top {
  display: flex;

  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
}

.brand-logo img {
  width: 155px;
  max-height: 75px;

  object-fit: contain;

  filter: drop-shadow(0 8px 25px rgba(0, 0, 0, 0.35));
}

.brand-status {
  display: inline-flex;

  align-items: center;

  gap: 9px;

  padding: 9px 14px;

  border-radius: 50px;

  background: rgba(255, 255, 255, 0.055);

  border: 1px solid rgba(255, 255, 255, 0.09);

  color: #cbd5e1;

  font-size: 11px;

  font-weight: 600;

  letter-spacing: 0.4px;
}

.status-dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: #22c55e;

  box-shadow:
    0 0 0 4px rgba(34, 197, 94, 0.1),
    0 0 14px rgba(34, 197, 94, 0.7);
}

/* =========================================================
   TEXTO PRINCIPAL
========================================================= */

.brand-main {
  max-width: 610px;

  margin-top: auto;
  margin-bottom: auto;

  padding-top: 60px;
}

.brand-tag {
  display: inline-block;

  color: #60a5fa;

  font-size: 11px;

  font-weight: 800;

  letter-spacing: 2px;

  margin-bottom: 20px;
}

.brand-main h1 {
  font-size: clamp(38px, 4vw, 60px);

  line-height: 1.05;

  letter-spacing: -2.5px;

  font-weight: 700;

  margin-bottom: 25px;
}

.brand-main h1 strong {
  display: block;

  color: #60a5fa;

  font-weight: 700;
}

.brand-main p {
  max-width: 510px;

  color: #94a3b8;

  font-size: 15px;

  line-height: 1.8;
}

/* =========================================================
   FEATURES
========================================================= */

.feature-grid {
  display: grid;

  grid-template-columns: repeat(2, 1fr);

  gap: 15px;

  max-width: 600px;

  margin-top: 45px;
}

.feature-item {
  display: flex;

  align-items: center;

  gap: 14px;

  padding: 16px;

  border-radius: 14px;

  background: rgba(255, 255, 255, 0.035);

  border: 1px solid rgba(255, 255, 255, 0.065);

  transition:
    background 0.25s ease,
    transform 0.25s ease;
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.06);

  transform: translateY(-2px);
}

.feature-icon {
  width: 40px;
  height: 40px;

  min-width: 40px;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 11px;

  background: rgba(37, 99, 235, 0.15);

  border: 1px solid rgba(96, 165, 250, 0.12);
}

.feature-icon svg {
  width: 19px;
  height: 19px;

  fill: #60a5fa;
}

.feature-item strong {
  display: block;

  color: #f8fafc;

  font-size: 12px;

  margin-bottom: 3px;
}

.feature-item span {
  display: block;

  color: #64748b;

  font-size: 11px;
}

/* =========================================================
   FOOTER PANEL IZQUIERDO
========================================================= */

.brand-footer {
  position: relative;

  z-index: 2;

  display: flex;

  align-items: center;

  gap: 12px;

  color: #64748b;

  font-size: 10px;
}

.footer-separator {
  width: 3px;
  height: 3px;

  border-radius: 50%;

  background: #475569;
}

/* =========================================================
   PANEL LOGIN
========================================================= */

.login-panel {
  min-height: 100vh;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 50px;

  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(37, 99, 235, 0.035),
      transparent 30%
    ),
    #ffffff;
}

.login-wrapper {
  width: 100%;
  max-width: 440px;
  position: relative;
  animation: loginAppear 0.7s ease forwards;
}

/* =========================================
   BOTÓN VOLVER
========================================= */

.login-wrapper > a {
  position: absolute;
  top: -40px;
  left: -75px;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 9px 14px;

  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(37, 99, 235, 0.25),
      transparent 35%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(14, 165, 233, 0.13),
      transparent 35%
    ),
    linear-gradient(145deg, #070b10 0%, #0d131c 50%, #101a29 100%);
  color: #ffffff;

  border: 1px solid #e5e7eb;
  border-radius: 10px;

  font-size: 13px;
  font-weight: 600;
  line-height: 1;

  text-decoration: none;

  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.04),
    0 8px 20px rgba(0, 0, 0, 0.04);

  transition:
    transform 0.25s ease,
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;

  z-index: 10;
}

/* Icono */
.login-wrapper > a::before {
  content: "←";

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 20px;
  height: 20px;

  font-size: 16px;
  font-weight: 500;

  transition: transform 0.25s ease;
}

/* Hover */
.login-wrapper > a:hover {
  background: #ffffff;
  color: #2563eb;

  border-color: #bfdbfe;

  transform: translateX(-2px);

  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.06),
    0 10px 25px rgba(37, 99, 235, 0.1);
}

.login-wrapper > a:hover::before {
  transform: translateX(-3px);
}

/* Active */
.login-wrapper > a:active {
  transform: translateX(0) scale(0.98);
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 520px) {
  .login-wrapper > a {
    top: -48px;
    left: 0;

    padding: 8px 12px;

    font-size: 12px;
    border-radius: 9px;
  }
}

@keyframes loginAppear {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   LOGO MOBILE
========================================================= */

.mobile-logo {
  display: none;

  text-align: center;

  margin-bottom: 35px;
}

.mobile-logo img {
  width: 150px;
  max-height: 70px;

  object-fit: contain;
}

/* =========================================================
   HEADER
========================================================= */
.log {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  margin-bottom: 5px;
}
.loginlogo {
  width: 150px;
}

.login-header {
  margin-bottom: 35px;
  text-align: center;
}

.welcome-label {
  display: inline-block;

  color: var(--primary);

  font-size: 10px;

  font-weight: 800;

  letter-spacing: 1.7px;

  margin-bottom: 11px;
}

.login-header h2 {
  color: #0f172a;

  font-size: 34px;

  line-height: 1.15;

  letter-spacing: -1px;

  font-weight: 750;

  margin-bottom: 10px;
}

.login-header p {
  color: #64748b;

  font-size: 13px;

  line-height: 1.7;
}

/* =========================================================
   ERROR
========================================================= */

.error-box {
  display: flex;

  align-items: center;

  gap: 12px;

  padding: 14px;

  margin-bottom: 22px;

  border-radius: 12px;

  background: #fff5f5;

  border: 1px solid #fecaca;

  animation: errorAppear 0.3s ease;
}

@keyframes errorAppear {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.error-icon {
  width: 34px;
  height: 34px;

  min-width: 34px;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 9px;

  background: #fee2e2;
}

.error-icon svg {
  width: 18px;
  height: 18px;

  fill: #dc2626;
}

.error-content strong {
  display: block;

  color: #991b1b;

  font-size: 12px;

  margin-bottom: 2px;
}

.error-content span {
  color: #b91c1c;

  font-size: 11px;

  line-height: 1.4;
}

/* =========================================================
   FORMULARIO
========================================================= */

.login-form {
  width: 100%;
}

.form-group {
  margin-bottom: 21px;
}

.form-group label {
  display: block;

  color: #334155;

  font-size: 12px;

  font-weight: 650;

  margin-bottom: 8px;
}

.label-row {
  display: flex;

  justify-content: space-between;
}

/* =========================================================
   INPUT
========================================================= */

.input-wrapper {
  position: relative;

  display: flex;

  align-items: center;
}

.input-wrapper input {
  width: 100%;

  height: 52px;

  padding: 0 48px 0 45px;

  border-radius: 11px;

  border: 1px solid #dbe2ea;

  background: #ffffff;

  color: #0f172a;

  font-family: inherit;

  font-size: 13px;

  outline: none;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.input-wrapper input::placeholder {
  color: #a8b1bf;
}

.input-wrapper input:hover {
  border-color: #cbd5e1;
}

.input-wrapper input:focus {
  border-color: #2563eb;

  background: #fff;

  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

/* =========================================================
   ICONOS INPUT
========================================================= */

.input-icon {
  position: absolute;

  left: 15px;

  top: 50%;

  transform: translateY(-50%);

  width: 18px;
  height: 18px;

  display: flex;

  align-items: center;
  justify-content: center;

  pointer-events: none;

  z-index: 2;
}

.input-icon svg {
  width: 17px;
  height: 17px;

  fill: #94a3b8;

  transition: fill 0.2s ease;
}

.input-wrapper:focus-within .input-icon svg {
  fill: #2563eb;
}

/* =========================================================
   MOSTRAR CONTRASEÑA
========================================================= */

.toggle-pass {
  position: absolute;

  right: 12px;

  top: 50%;

  transform: translateY(-50%);

  width: 34px;
  height: 34px;

  display: flex;

  align-items: center;
  justify-content: center;

  border: none;

  border-radius: 8px;

  background: transparent;

  cursor: pointer;

  color: #94a3b8;

  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.toggle-pass:hover {
  color: #2563eb;

  background: #eff6ff;
}

.toggle-pass svg {
  width: 17px;
  height: 17px;

  fill: currentColor;
}

/* =========================================================
   OPCIONES
========================================================= */

.login-options {
  display: flex;

  align-items: center;

  justify-content: space-between;

  margin-top: -4px;

  margin-bottom: 22px;

  font-size: 12px;
}

.remember {
  display: flex;

  align-items: center;

  gap: 7px;

  color: #64748b;

  cursor: pointer;
}

.remember input {
  width: 14px;
  height: 14px;

  accent-color: #2563eb;
}

.forgot-link {
  color: #2563eb;

  text-decoration: none;

  font-weight: 600;

  transition: color 0.2s ease;
}

.forgot-link:hover {
  color: #1d4ed8;
}

/* =========================================================
   BOTÓN LOGIN
========================================================= */

.btn-login {
  position: relative;

  width: 100%;

  height: 53px;

  display: flex;

  align-items: center;
  justify-content: center;

  gap: 10px;

  border: none;

  border-radius: 11px;

  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);

  color: white;

  font-family: inherit;

  font-size: 13px;

  font-weight: 700;

  letter-spacing: 0.1px;

  cursor: pointer;

  overflow: hidden;

  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.btn-login::before {
  content: "";

  position: absolute;

  top: 0;
  left: -100%;

  width: 60%;
  height: 100%;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );

  transform: skewX(-20deg);

  transition: left 0.6s ease;
}

.btn-login:hover::before {
  left: 140%;
}

.btn-login:hover {
  transform: translateY(-2px);

  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login svg {
  width: 18px;
  height: 18px;

  fill: white;

  transition: transform 0.2s ease;
}

.btn-login:hover svg {
  transform: translateX(3px);
}

/* =========================================================
   SEGURIDAD
========================================================= */

.security-info {
  display: flex;

  align-items: center;

  gap: 12px;

  margin-top: 28px;

  padding: 14px 15px;

  border-radius: 11px;

  background: #f8fafc;

  border: 1px solid #edf1f5;
}

.security-icon {
  width: 34px;
  height: 34px;

  min-width: 34px;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 9px;

  background: #ecfdf5;
}

.security-icon svg {
  width: 17px;
  height: 17px;

  fill: #059669;
}

.security-info strong {
  display: block;

  color: #334155;

  font-size: 11px;

  margin-bottom: 3px;
}

.security-info span {
  display: block;

  color: #94a3b8;

  font-size: 10px;
}

/* =========================================================
   FOOTER
========================================================= */

.login-footer {
  display: flex;

  justify-content: center;
  align-items: center;

  gap: 8px;

  margin-top: 30px;

  color: #a0aabb;

  font-size: 10px;
}

/* =========================================================
   PASSWORD NATIVO
========================================================= */

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}

/* =========================================================
   SELECCIÓN
========================================================= */

::selection {
  background: rgba(37, 99, 235, 0.18);

  color: #1e3a8a;
}

/* =========================================================
   RESPONSIVE TABLET
========================================================= */

@media (max-width: 1050px) {
  .login-page {
    grid-template-columns: 0.9fr 1.1fr;
  }

  .brand-panel {
    padding: 45px;
  }

  .login-panel {
    padding: 40px;
  }

  .brand-main h1 {
    font-size: 44px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   RESPONSIVE MÓVIL
========================================================= */

@media (max-width: 800px) {
  .login-page {
    display: block;

    min-height: 100vh;
  }

  .brand-panel {
    display: none;
  }

  .login-panel {
    min-height: 100vh;

    padding: 35px 22px;

    background:
      radial-gradient(
        circle at 100% 0%,
        rgba(37, 99, 235, 0.06),
        transparent 35%
      ),
      #ffffff;
  }

  .login-wrapper {
    max-width: 430px;
  }

  .mobile-logo {
    display: block;
  }

  .login-header {
    margin-bottom: 30px;
  }

  .login-header h2 {
    font-size: 30px;
  }
}

/* =========================================================
   MÓVILES PEQUEÑOS
========================================================= */

@media (max-width: 400px) {
  .login-panel {
    padding: 28px 18px;
  }

  .mobile-logo {
    margin-bottom: 28px;
  }

  .mobile-logo img {
    width: 135px;
  }

  .login-header h2 {
    font-size: 27px;
  }

  .input-wrapper input {
    height: 50px;
  }

  .btn-login {
    height: 51px;
  }
}

/* =========================================================
   REDUCIR ANIMACIONES
========================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
