/* ======================= */
/* VARIABLES Y RESET */
/* ======================= */
:root {
  --primary: #E67E22;
  --primary-dark: #D35400;
  --primary-light: #F7941D;
  --accent: #FFB74D;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --error: #ef4444;
  --success: #10b981;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-50);
}

/* ======================= */
/* LAYOUT PRINCIPAL */
/* ======================= */
.login-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ======================= */
/* PANEL IZQUIERDO - FORMULARIO */
/* ======================= */
.login-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--white);
}

.login-content {
  width: 100%;
  max-width: 420px;
}

/* Logo */
.logo-container {
  margin-bottom: 40px;
}

.login-logo {
  height: 60px;
  width: auto;
  object-fit: contain;
}

/* Títulos */
.login-subtitle {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.login-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 40px;
  letter-spacing: -0.5px;
}

/* ======================= */
/* FORMULARIO */
/* ======================= */
.login-form {
  width: 100%;
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input {
  width: 100%;
  padding: 14px 48px 14px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--gray-800);
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  outline: none;
  transition: all 0.2s ease;
}

.form-input::placeholder {
  color: var(--gray-400);
}

.form-input:hover {
  border-color: var(--gray-300);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(24, 75, 148, 0.1);
}

.input-icon {
  position: absolute;
  right: 16px;
  color: var(--gray-400);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password {
  cursor: pointer;
  transition: color 0.2s ease;
}

.toggle-password:hover {
  color: var(--primary);
}

/* Mensajes de error */
.error-message {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--error);
  font-weight: 500;
}

/* ======================= */
/* BOTÓN DE LOGIN */
/* ======================= */
.btn-login {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  margin-top: 32px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px 0 rgba(230, 126, 34, 0.4);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(230, 126, 34, 0.5);
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login i {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.btn-login:hover i {
  transform: translateX(4px);
}

/* ======================= */
/* FOOTER */
/* ======================= */
.login-footer {
  margin-top: 48px;
  text-align: center;
}

.login-footer p {
  font-size: 13px;
  color: var(--gray-400);
  font-weight: 500;
}

/* ======================= */
/* PANEL DERECHO - DECORATIVO */
/* ======================= */
.login-right {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #E67E22 0%, #D35400 50%, #C0392B 100%);
  overflow: hidden;
}

/* Fondo decorativo con formas abstractas */
.decorative-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
  animation: float 20s ease-in-out infinite;
}

.shape-1 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, #F7941D 0%, #E67E22 100%);
  top: -20%;
  right: -10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #FFB74D 0%, #F7941D 100%);
  bottom: -15%;
  left: -10%;
  animation-delay: -5s;
}

.shape-3 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #FFCC80 0%, #FFB74D 100%);
  top: 40%;
  right: 30%;
  animation-delay: -10s;
}

.shape-4 {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, #FFE0B2 0%, #FFCC80 100%);
  bottom: 30%;
  right: 10%;
  animation-delay: -15s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(30px, -30px) rotate(5deg);
  }
  50% {
    transform: translate(-20px, 20px) rotate(-5deg);
  }
  75% {
    transform: translate(20px, 30px) rotate(3deg);
  }
}

/* Contenido del panel derecho */
.right-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 40px;
}

.brand-text h2 {
  font-size: 42px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  letter-spacing: -1px;
}

.brand-text p {
  font-size: 20px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

/* ======================= */
/* RESPONSIVE DESIGN */
/* ======================= */
@media (max-width: 1024px) {
  .login-right {
    display: none;
  }

  .login-left {
    flex: 1;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
  }

  .login-content {
    max-width: 400px;
  }
}

@media (max-width: 768px) {
  .login-left {
    padding: 30px 24px;
  }

  .login-title {
    font-size: 28px;
    margin-bottom: 32px;
  }

  .login-logo {
    height: 50px;
  }

  .logo-container {
    margin-bottom: 32px;
  }

  .form-input {
    padding: 12px 44px 12px 14px;
    font-size: 16px; /* Evita zoom en iOS */
  }

  .btn-login {
    padding: 14px 20px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .login-left {
    padding: 24px 20px;
  }

  .login-title {
    font-size: 24px;
    margin-bottom: 28px;
  }

  .login-subtitle {
    font-size: 13px;
  }

  .form-group {
    margin-bottom: 20px;
  }

  .form-label {
    font-size: 13px;
  }

  .login-footer {
    margin-top: 36px;
  }

  .login-footer p {
    font-size: 12px;
  }
}

/* ======================= */
/* ANIMACIONES DE ENTRADA */
/* ======================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-content {
  animation: fadeInUp 0.6s ease-out;
}

.form-group {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.form-group:nth-child(1) {
  animation-delay: 0.1s;
}

.form-group:nth-child(2) {
  animation-delay: 0.2s;
}

.btn-login {
  animation: fadeInUp 0.6s ease-out 0.3s;
  animation-fill-mode: both;
}
