/* =============================
   CSS DEL LOGIN - TicketShow App
   ============================= */

/* Importar fuentes */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

/* Variables CSS - usando las del proyecto */
:root {
  --color-primary: #475569;
  --color-primary-dark: #334155;
  --color-secondary: #64748b;
  --color-success: #059669;
  --color-warning: #d97706;
  --color-danger: #dc2626;
  --color-info: #2563eb;
  --color-bg: #f8fafc;
  --color-bg-card: #fff;
  --color-border: #e2e8f0;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --radius: 10px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --font-family: "Poppins", Arial, sans-serif;
}

/* Reset y estilos base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* Efectos de fondo */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
  z-index: 1;
}

/* Contenedor principal del login */
.login_container {
  display: flex;
  background: var(--color-bg-card);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  width: 100%;
  max-width: 900px;
  min-height: 500px;
  position: relative;
  z-index: 2;
}

/* Lado izquierdo - Formulario */
.login_form_container {
  flex: 1;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--color-bg-card);
  position: relative;
}

.login_form_container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.login_header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login_title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login_subtitle {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 400;
}

/* Formulario */
.login_form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form_group {
  position: relative;
}

.form_group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.form_group input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: var(--color-bg-card);
  color: var(--color-text);
  transition: all 0.3s ease;
  position: relative;
}

.form_group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.form_group input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.7;
}

/* Iconos en los campos */
.form_group i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(40%);
  color: var(--color-text-muted);
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

.form_group input:focus + i {
  color: #667eea;
}

/* Botón de login */
.login_btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.login_btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.login_btn:active {
  transform: translateY(0);
}

.login_btn i {
  font-size: 0.9rem;
}

/* Mensaje de error */
.error_login {
  background: #fef2f2;
  color: var(--color-danger);
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
}

/* Lado derecho - Imagen */
.login_image_container {
  flex: 1;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.login_image_container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
  opacity: 0.3;
}

.login_image {
  max-width: 100%;
  height: auto;
  max-height: 300px;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

/* Responsive */
@media (max-width: 768px) {
  .login_container {
    flex-direction: column;
    max-width: 400px;
    min-height: auto;
  }

  .login_form_container {
    padding: 2rem;
  }

  .login_image_container {
    padding: 1.5rem;
    min-height: 200px;
  }

  .login_image {
    max-height: 150px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .login_form_container {
    padding: 1.5rem;
  }

  .login_title {
    font-size: 1.5rem;
  }

  .form_group input {
    padding: 0.875rem 0.875rem 0.875rem 2.5rem;
  }

  .login_btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login_form_container {
  animation: fadeInUp 0.6s ease-out;
}

.login_image_container {
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Efecto de carga en el botón */
.login_btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.login_btn.loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Estilos adicionales para funcionalidades JavaScript */
.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.3s ease;
  z-index: 10;
}

.password-toggle:hover {
  color: #667eea;
}

.form_group.focused input {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form_group.focused i {
  color: #667eea;
}

/* Animaciones adicionales */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 0.8;
  }
}
