/* login.css - Estilos mejorados para la página de login */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #3ecb85;
  --primary-light: #4fdea0;
  --primary-dark: #28a76d;
  --secondary: #3c7f78;
  --secondary-light: #4a9a92;
  --secondary-dark: #2b6058;
  --accent: #ffc667;
  --accent-light: #ffd485;
  --accent-dark: #fbbd08;
  --danger: #e74c3c;
  --success: #3ecb85;
  --warning: #f5b041;
  --info: #4a9a92;
  --light: #f9f9f9;
  --dark: #333333;
  --gray: #777777;
  --gray-light: #e0e0e0;
  --gray-dark: #565656;
  --border-radius: 16px;
  --shadow-sm: 0 3px 6px rgba(0, 0, 0, 0.05);
  --shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 15px 30px rgba(62, 203, 133, 0.2);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* ESTILOS PARA SCROLL */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #e0e0e0;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background-color: #3c7f78;
  border-radius: 10px;
  border: 2px solid #e0e0e0;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #2b6058;
}

/* ==== RESET BÁSICO ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
}

body {
  background-color: #f8f8f8;
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==== CONTENEDOR PRINCIPAL ==== */
.login-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* ==== TARJETA DE LOGIN ==== */
.login-card {
  background: white;
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 1000px;
  display: flex;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.login-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* ==== LADO IZQUIERDO (IMAGEN) ==== */
.login-image {
  position: relative;
  background: url('../assets/images/huellas.png') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45%;
  min-height: 600px;
}

.login-overlay {
  background: linear-gradient(135deg, rgba(62, 203, 133, 0.9), rgba(60, 127, 120, 0.9));
  width: 100%;
  height: 100%;
  padding: 40px;
  color: white;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.login-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.3;
  z-index: 0;
}

/* ==== LOGO ==== */
.login-logo {
  width: 130px;
  filter: brightness(0) invert(1);
  transition: transform 0.3s ease;
  z-index: 1;
}

.login-logo:hover {
  transform: scale(1.05);
}

.login-overlay h1 {
  font-weight: 700;
  color: white;
  font-size: 28px;
  z-index: 1;
}

.login-overlay p {
  font-size: 16px;
  font-weight: 400;
  color: white;
  margin: 0;
  line-height: 1.6;
  z-index: 1;
}

.login-overlay i {
  font-size: 18px;
}

/* ==== LADO DERECHO (FORMULARIO) ==== */
.login-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 55%;
  align-items: flex-start;
  padding: 50px;
}

.login-content h2 {
  font-weight: 500;
  font-size: 24px;
  margin-bottom: 30px;
  color: var(--dark);
  position: relative;
  padding-bottom: 15px;
}

.login-content h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
}

/* ==== MENSAJE DE ERROR ==== */
.login-error {
  background-color: rgba(231, 76, 60, 0.1);
  color: var(--danger);
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 25px;
  font-size: 14px;
  border-left: 4px solid var(--danger);
  width: 100%;
}

/* ==== FORMULARIO ==== */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
  width: 100%;
}

/* ==== CAMPOS DE TEXTO ==== */
.login-textbox {
  position: relative;
  width: 100%;
}

.login-textbox input {
  width: 100%;
  padding: 18px 16px;
  font-size: 16px;
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  background: var(--light);
  color: var(--dark);
  transition: all 0.3s ease;
}

.login-textbox input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(62, 203, 133, 0.15);
}

.login-textbox label {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  color: var(--gray);
  pointer-events: none;
  transition: all 0.3s ease;
  background: transparent;
  padding: 0 5px;
}

.login-textbox input:focus~label,
.login-textbox input:not(:placeholder-shown)~label {
  top: 0;
  left: 16px;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--primary);
  background: white;
}

.login-textbox input::placeholder {
  color: transparent;
}

/* ==== BOTÓN DE LOGIN ==== */
.login-button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 0 25px;
  height: 54px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(62, 203, 133, 0.25);
  margin-top: 10px;
}

.login-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(62, 203, 133, 0.3);
}

.login-button p {
  margin: 0;
}

.login-button .material-symbols-outlined {
  font-size: 20px;
}

/* ==== LINK DE REGISTRO ==== */
.login-register {
  margin-top: 30px;
  color: var(--gray);
  font-size: 14px;
  text-align: center;
  width: 100%;
}

.login-register a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.login-register a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ==== RESPONSIVE DESIGN ==== */
@media (max-width: 992px) {
  .login-card {
    flex-direction: column;
    max-width: 500px;
  }

  .login-image {
    width: 100%;
    min-height: 200px;
  }

  .login-content {
    width: 100%;
    padding: 30px;
  }

  .login-overlay {
    padding: 30px;
  }

  .login-overlay h1 {
    font-size: 24px;
  }

  .login-overlay p {
    font-size: 14px;
  }
}

@media (max-width: 576px) {
  .login-wrapper {
    padding: 20px 15px;
  }

  .login-content {
    padding: 25px 20px;
  }

  .login-overlay {
    padding: 25px 15px;
  }

  .login-overlay h1 {
    font-size: 22px;
  }

  .login-content h2 {
    font-size: 20px;
  }

  .login-button {
    height: 50px;
  }
}

/* ==== ANIMACIONES ==== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-card {
  animation: fadeIn 0.5s ease-out;
}
