/* Login Moderno - Estilo Seller Center */

/* Variables CSS */
:root {
  --title-gradient: linear-gradient(135deg, #DC3022 0%, #E98B10 100%);
  --primary-color: #222529;
  --secondary-color: #4a5568;
  --background-color: #f7fafc;
  --text-dark: #1a202c;
  --text-muted: #718096;
  --border-color: #e2e8f0;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Reset y base */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--background-color);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 20px;
}

/* Container principal del login */
.form-signin {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  transition: box-shadow 0.3s ease;
}

.form-signin:hover {
  box-shadow: var(--shadow-hover);
}

/* Logo/Título con gradiente */
.login-title {
  background: var(--title-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
  letter-spacing: -0.5px;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  text-align: center;
  margin-bottom: 2rem;
  font-weight: 400;
}

/* Campos de entrada modernos */
.form-floating {
  margin-bottom: 1.5rem;
}

.form-floating > .form-control {
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem 0.75rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #ffffff;
}

.form-floating > .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(45, 55, 72, 0.1);
  background: white;
}

.form-floating > label {
  color: var(--text-muted);
  font-weight: 500;
  padding: 1rem 0.75rem;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: var(--primary-color);
  transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Botón principal */
.btn-login {
  background: var(--primary-color);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  padding: 1rem;
  width: 100%;
  transition: all 0.3s ease;
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Overlay para transición suave del gradiente */
.btn-login::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--title-gradient);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: 8px;
  z-index: -1;
}

.btn-login:hover::after {
  opacity: 1;
}

.btn-login:hover {
  /* transform: translateY(-2px); */
  box-shadow: 0 8px 25px rgba(220, 48, 34, 0.3);
  color: white;
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login:focus {
  box-shadow: 0 0 0 3px rgba(220, 48, 34, 0.2);
  color: white;
}

/* Efecto de ondas en el botón */
.btn-login::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  z-index: -1;
}

.btn-login:active::before {
  width: 300px;
  height: 300px;
}

/* Footer del login */
.login-footer {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 0;
}

/* Logo oculto */
.form-signin img {
  display: none;
}

/* Responsive */
@media (max-width: 480px) {
  .form-signin {
    padding: 30px 20px;
    margin: 10px;
  }
  
  .login-title {
    font-size: 2rem;
  }
}

/* Animaciones de entrada */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-signin {
  animation: fadeInUp 0.6s ease;
}

/* Estados de error (para futuro uso) */
.form-control.is-invalid {
  border-color: #dc3545;
}

.form-control.is-invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Loading state para el botón */
.btn-login.loading {
  pointer-events: none;
  position: relative;
}

.btn-login.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  margin: auto;
  border: 2px solid transparent;
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s ease infinite;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Estilo para mensajes de error/éxito */
.alert {
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border: none;
  font-weight: 500;
}

.alert-danger {
  background: #fef2f2;
  color: #dc2626;
}

.alert-success {
  background: #f0fdf4;
  color: #16a34a;
}