
/*===== GOOGLE FONTS =====*/
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

/*===== VARIABLES CSS =====*/
:root {
  --primary: #0a5c8a;
  --primary-dark: #044060;
  --primary-light: #1a7ab5;
  --accent: #00b4d8;
  --bg-gradient-1: #0a2540;
  --bg-gradient-2: #0d4f7a;
  --bg-gradient-3: #1a7ab5;
  --text-dark: #1a1a2e;
  --text-medium: #4a5568;
  --text-light: #94a3b8;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gray-50);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== LAYOUT PRINCIPAL ===== */
.login-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ===== PANEL LATERAL IZQUIERDO ===== */
.login-side-panel {
  flex: 0 0 45%;
  background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 50%, var(--bg-gradient-3) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 3rem;
}

.side-panel-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 420px;
}

.side-logo {
  width: 220px;
  max-width: 80%;
  margin-bottom: 2.5rem;
  filter: brightness(1.1);
  animation: fadeInUp 0.8s ease-out;
}

.side-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 1rem;
  animation: fadeInUp 0.8s ease-out 0.15s both;
}

.side-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.75);
  font-weight: 300;
  line-height: 1.6;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

/* Decoraciones del panel lateral */
.side-decoration {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.deco-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.08);
}

.deco-circle-1 {
  width: 300px;
  height: 300px;
  top: -80px;
  left: -80px;
  background: radial-gradient(circle, rgba(0,180,216,0.15), transparent 70%);
  animation: float 8s ease-in-out infinite;
}

.deco-circle-2 {
  width: 200px;
  height: 200px;
  bottom: -50px;
  right: -50px;
  background: radial-gradient(circle, rgba(26,122,181,0.2), transparent 70%);
  animation: float 6s ease-in-out infinite reverse;
}

.deco-circle-3 {
  width: 120px;
  height: 120px;
  top: 40%;
  right: 10%;
  background: radial-gradient(circle, rgba(0,180,216,0.1), transparent 70%);
  animation: float 10s ease-in-out infinite 2s;
}

/* ===== PANEL DERECHO (FORMULARIO) ===== */
.login-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--gray-50);
}

/* ===== TARJETA DE LOGIN ===== */
.login-card {
  width: 100%;
  max-width: 440px;
  animation: fadeInUp 0.6s ease-out;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  height: 60px;
  margin-bottom: 1.5rem;
  object-fit: contain;
}

.login-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.35rem;
}

.login-subtitle {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 400;
}

/* ===== FORMULARIO ===== */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-label i {
  color: var(--primary);
  font-size: 0.75rem;
  margin-right: 0.25rem;
}

.form-input {
  width: 100%;
  height: 50px;
  padding: 0 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  outline: none;
  transition: var(--transition);
}

.form-input:hover {
  border-color: var(--gray-300);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 92, 138, 0.12);
}

.form-input-error {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

.form-input::placeholder {
  color: var(--text-light);
  font-weight: 400;
}

/* Wrapper para contraseña con toggle */
.password-wrapper {
  position: relative;
}

.password-wrapper .form-input {
  padding-right: 3rem;
}

.toggle-password {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 1rem;
  padding: 0.25rem;
  transition: var(--transition);
}

.toggle-password:hover {
  color: var(--primary);
}

/* ===== ALERTAS ===== */
.alerts-container {
  min-height: 0;
}

.alert {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  animation: slideIn 0.3s ease-out;
}

.alert i {
  font-size: 1rem;
  flex-shrink: 0;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: #991b1b;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ===== BOTÓN LOGIN ===== */
.btn-login {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  margin-top: 0.5rem;
  position: relative;
  overflow: hidden;
}

.btn-login:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-login:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-icon {
  transition: transform 0.3s ease;
}

.btn-login:hover .btn-icon {
  transform: translateX(3px);
}

/* ===== FOOTER DEL LOGIN ===== */
.login-footer {
  margin-top: 2rem;
  text-align: center;
}

.secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  background: rgba(16, 185, 129, 0.08);
  color: #065f46;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.secure-badge i {
  color: var(--success);
}

.help-text {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}

.contact-btn.whatsapp {
  background: rgba(37, 211, 102, 0.1);
  color: #128c48;
  border: 1px solid rgba(37, 211, 102, 0.2);
}

.contact-btn.whatsapp:hover {
  background: rgba(37, 211, 102, 0.2);
  transform: translateY(-1px);
}

.contact-btn.email {
  background: rgba(10, 92, 138, 0.08);
  color: var(--primary);
  border: 1px solid rgba(10, 92, 138, 0.15);
}

.contact-btn.email:hover {
  background: rgba(10, 92, 138, 0.15);
  transform: translateY(-1px);
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(3deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .login-side-panel {
    flex: 0 0 40%;
    padding: 2rem;
  }

  .side-title {
    font-size: 1.5rem;
  }

  .side-logo {
    width: 180px;
  }
}

@media (max-width: 768px) {
  .login-wrapper {
    flex-direction: column;
  }

  .login-side-panel {
    flex: none;
    min-height: 200px;
    padding: 2rem 1.5rem;
  }

  .side-logo {
    width: 140px;
    margin-bottom: 1rem;
  }

  .side-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }

  .side-subtitle {
    font-size: 0.85rem;
  }

  .login-form-panel {
    padding: 1.5rem;
  }

  .login-card {
    max-width: 100%;
  }

  .deco-circle-1 {
    width: 150px;
    height: 150px;
    top: -40px;
    left: -40px;
  }

  .deco-circle-2 {
    width: 100px;
    height: 100px;
  }

  .deco-circle-3 {
    display: none;
  }
}

@media (max-width: 480px) {
  .login-form-panel {
    padding: 1rem;
  }

  .login-title {
    font-size: 1.5rem;
  }

  .contact-links {
    flex-direction: column;
    align-items: center;
  }

  .contact-btn {
    width: 100%;
    max-width: 200px;
    justify-content: center;
  }
}
