:root {
  --primary-color: #00a39e;
  --primary-dark: #00a39e;
  --secondary-color: #00113f;
  --accent-color: #4cc9f0;
  --text-dark: #212529;
  --text-light: #6c757d;
  --bg-light: #f8f9fa;
  --white: #ffffff;
  --success: #4bb543;
  --error: #e63946;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --radius: 16px;
}

body {
  background: 
    linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), /* color negro con 50% opacidad */
    url('../../imagenes/fondo.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  position: relative;
  overflow-x: hidden;
  padding: 20px;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4); /* overlay con opacidad */
  backdrop-filter: blur(5px); /* desenfoque de fondo */
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1; /* asegura que el contenido esté encima */
}
/* Fondo animado financiero */
.financial-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.financial-elements {
  position: absolute;
  width: 100%;
  height: 100%;
}

.financial-element {
  position: absolute;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.1;
}

.element-coin {
  width: 100px;
  height: 100px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='%23ffffff'%3E%3Ccircle cx='32' cy='32' r='30'/%3E%3Ctext x='32' y='38' text-anchor='middle' font-size='20' fill='%232c4967' font-weight='bold'%3E$%3C/text%3E%3C/svg%3E");
  top: 15%;
  left: 10%;
  animation: float 15s infinite ease-in-out;
}

.element-chart {
  width: 120px;
  height: 120px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='%23ffffff'%3E%3Cpolyline points='8,40 20,28 32,36 44,24 56,32' stroke='%23ffffff' stroke-width='3' fill='none'/%3E%3C/svg%3E");
  top: 20%;
  right: 15%;
  animation: float 20s infinite ease-in-out reverse;
}

.element-graph {
  width: 90px;
  height: 90px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='%23ffffff'%3E%3Crect x='10' y='24' width='8' height='30'/%3E%3Crect x='24' y='14' width='8' height='40'/%3E%3Crect x='38' y='34' width='8' height='20'/%3E%3Crect x='52' y='18' width='8' height='36'/%3E%3C/svg%3E");
  top: 60%;
  right: 25%;
  animation: float 17s infinite ease-in-out;
}

.element-wallet {
  width: 80px;
  height: 80px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='%23ffffff'%3E%3Cpath d='M52,16H12C9.8,16,8,17.8,8,20v32c0,2.2,1.8,4,4,4h40c2.2,0,4-1.8,4-4V20C56,17.8,54.2,16,52,16z M52,44H40c-2.2,0-4-1.8-4-4 s1.8-4,4-4h12V44z M40,32c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S41.1,32,40,32z'/%3E%3C/svg%3E");
  top: 10%;
  right: 5%;
  animation: float 19s infinite ease-in-out reverse;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  33% {
    transform: translateY(-20px) rotate(5deg);
  }
  66% {
    transform: translateY(10px) rotate(-5deg);
  }
}

/* Contenedor principal centrado */
.container {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 40px);
}

/* Tarjeta de login moderna - MANTIENE ESTRUCTURA ORIGINAL */
.row {
  width: 100%;
  display: flex;
  justify-content: center;
}

.login-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  max-width: 1000px;
  width: 100%;
  min-height: 600px;
  position: relative;
  z-index: 1;
  display: flex;
}

/* Panel izquierdo con imagen financiera */
.login-left-panel {
  flex: 1;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.login-left-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  animation: shineLeft 8s infinite linear;
}

@keyframes shineLeft {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.login-left-panel h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
  position: relative;
  z-index: 2;
}

.login-left-panel p {
  font-size: 1.1rem;
  opacity: 0.9;
  line-height: 1.6;
  max-width: 400px;
  margin-bottom: 40px;
  position: relative;
  z-index: 2;
}

/* Panel derecho con formulario - MANTIENE ESTRUCTURA ORIGINAL */
.col-12.col-md-4.col-lg-6 {
  flex: 1;
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* MANTENIENDO EXACTAMENTE LOS MISMOS ESTILOS DEL FORMULARIO ORIGINAL */
.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.login-header .mb-3 {
  margin-bottom: 30px !important;
}

.login-header img {
  max-height: 120px;
  transition: var(--transition);
}

.login-header img:hover {
  transform: scale(1.05);
}

.login-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.login-header p {
  color: var(--text-light);
  font-size: 1.1rem;
  margin: 0;
}

/* FORMULARIO ORIGINAL - MANTIENDO EXACTAMENTE LOS MISMOS SELECTORES */
.login-form {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

/* MANTENIENDO LOS MISMOS SELECTORES Y PROPIEDADES CSS */
.mb-3.position-relative {
  position: relative;
  margin-bottom: 30px;
}

.form-label {
  display: block;
  margin-bottom: 10px;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 16px 20px 16px 50px !important;
  background: white;
  border: 2px solid #e1e5ee;
  border-radius: 12px;
  font-size: 1rem;
  color: var(--text-dark);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 4px rgba(44, 73, 103, 0.1) !important;
}

.input-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1.1rem;
  transition: var(--transition);
  z-index: 2;
}

.form-control:focus + .input-icon {
  color: var(--primary-color) !important;
  transform: translateY(-50%) scale(1.1);
}

.password-toggle {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
  padding: 5px;
}

.password-toggle:hover {
  color: var(--primary-color) !important;
  transform: translateY(-50%) scale(1.1);
}

.mb-3.d-flex.justify-content-between.align-items-center {
  margin-bottom: 30px !important;
}

.forgot-password {
  color: var(--primary-color) !important;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

.forgot-password:hover {
  color: var(--secondary-color) !important;
  text-decoration: underline;
}

/* BOTÓN ORIGINAL CON MEJORAS VISUALES */
.btn-login {
  width: 100%;
  position: relative;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  border: none;
  color: white;
  padding: 18px !important;
  border-radius: 12px !important;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 8px 25px rgba(44, 73, 103, 0.3);
  margin-bottom: 25px !important;
}

.btn-login:hover {
  background: linear-gradient(
    135deg,
    var(--primary-dark),
    var(--primary-color)
  ) !important;
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(44, 73, 103, 0.4) !important;
  color: white !important;
}

.btn-shine {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 70%
  );
  transform: rotate(45deg);
  animation: shine 3s infinite linear;
  z-index: 1;
}

@keyframes shine {
  0% {
    transform: translateX(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) rotate(45deg);
  }
}

.btn-text,
.btn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.login-footer {
  text-align: center;
  padding-top: 25px;
  border-top: 1px solid #e1e5ee;
  color: var(--text-light);
  font-size: 0.95rem;
}

.login-footer a {
  color: var(--primary-color) !important;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.login-footer a:hover {
  color: var(--secondary-color) !important;
  text-decoration: underline;
}

/* Elementos de seguridad adicionales */
.security-info {
  margin-top: 30px;
  text-align: center;
}

.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(76, 201, 240, 0.1);
  color: var(--accent-color);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Responsividad */
@media (max-width: 992px) {
  .login-container {
    flex-direction: column;
    max-width: 500px;
    min-height: auto;
  }

  .login-left-panel {
    padding: 40px 30px;
  }

  .login-left-panel h2 {
    font-size: 1.8rem;
  }

  .login-left-panel p {
    font-size: 1rem;
  }

  .col-12.col-md-4.col-lg-6 {
    padding: 40px 30px;
  }
}

@media (max-width: 576px) {
  body {
    padding: 15px;
  }

  .login-left-panel {
    padding: 30px 20px;
  }

  .login-left-panel h2 {
    font-size: 1.5rem;
  }

  .col-12.col-md-4.col-lg-6 {
    padding: 30px 20px;
  }

  .login-header h1 {
    font-size: 1.6rem;
  }

  .form-control {
    padding: 14px 18px 14px 45px !important;
  }
}

/* Animación de aparición */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate__fadeInUp {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Estilos para la animación financiera en panel izquierdo */
.financial-animation {
  margin: 30px 0;
  position: relative;
  height: 150px;
  width: 100%;
  max-width: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.graph-container {
  width: 100%;
  height: 120px;
  position: relative;
}

.graph-line {
  position: absolute;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  bottom: 0;
}

.graph-bar {
  position: absolute;
  bottom: 0;
  width: 20px;
  background: linear-gradient(to top, var(--secondary-color), #ffd966);
  border-radius: 4px 4px 0 0;
  animation: growBar 1.5s ease-out forwards;
  opacity: 0;
}

.bar-1 {
  left: 15%;
  height: 60px;
  animation-delay: 0.2s;
}
.bar-2 {
  left: 25%;
  height: 90px;
  animation-delay: 0.4s;
}
.bar-3 {
  left: 35%;
  height: 120px;
  animation-delay: 0.6s;
}
.bar-4 {
  left: 45%;
  height: 100px;
  animation-delay: 0.8s;
}
.bar-5 {
  left: 55%;
  height: 140px;
  animation-delay: 1s;
}
.bar-6 {
  left: 65%;
  height: 80px;
  animation-delay: 1.2s;
}

@keyframes growBar {
  0% {
    height: 0;
    opacity: 0;
  }
  100% {
    height: var(--height);
    opacity: 1;
  }
}
