:root {
  --primary: #0050CB;
  --primary-dark: #0050CB;
  --primary-hover: #003D9E;
  --primary-hover-dark: #3F84F2;
  --primary-light: #E3EFFF;
  --primary-pressed: #003384;
  --primary-pressed-dark: #4789F2;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.modern-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(245, 247, 250, 0.9) 100%), 
              url(../img/fondo.png) 50% 50% no-repeat;
  background-size: cover;
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.modern-login__container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 480px;
}

.modern-login__card {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 80, 203, 0.08), 
              0 8px 20px rgba(0, 80, 203, 0.04);
  padding: 48px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modern-login__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 72px rgba(0, 80, 203, 0.12), 
              0 12px 28px rgba(0, 80, 203, 0.06);
}

.modern-login__header {
  text-align: center;
  margin-bottom: 40px;
}

.modern-login__logo {
  height: 56px;
  margin-bottom: 24px;
  object-fit: contain;
}

.modern-login__title {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.modern-login__subtitle {
  font-size: 15px;
  color: #6b7280;
  font-weight: 400;
}

.modern-login__form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field__label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0;
}

.form-field__wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-field__icon {
  position: absolute;
  left: 18px;
  color: #9ca3af;
  font-size: 16px;
  transition: color 0.2s ease;
  pointer-events: none;
}

.form-field__input {
  width: 100%;
  height: 52px;
  padding: 0 18px 0 50px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 15px;
  color: #1f2937;
  background: #ffffff;
  transition: all 0.2s ease;
  outline: none;
}

.form-field__input::placeholder {
  color: #9ca3af;
}

.form-field__input:focus {
  border-color: var(--primary);
  background: #fafbfc;
}

.form-field__input:focus ~ .form-field__icon,
.form-field__wrapper:focus-within .form-field__icon {
  color: var(--primary);
}

.form-field__input.is-invalid {
  border-color: #ef4444;
  background: #fef2f2;
}

.form-field__error {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #ef4444;
  margin-top: 4px;
}

.form-field__error i {
  font-size: 12px;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  position: relative;
  gap: 10px;
}

.custom-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.custom-checkbox__checkmark {
  position: relative;
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  background: #ffffff;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.custom-checkbox input:checked ~ .custom-checkbox__checkmark {
  background: var(--primary);
  border-color: var(--primary);
}

.custom-checkbox__checkmark::after {
  content: '';
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .custom-checkbox__checkmark::after {
  display: block;
}

.custom-checkbox__label {
  font-size: 14px;
  color: #4b5563;
  font-weight: 500;
}

.btn-primary {
  width: 100%;
  height: 56px;
  background: var(--primary);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
  margin-top: 8px;
  box-shadow: 0 4px 12px rgba(0, 80, 203, 0.2);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 80, 203, 0.3);
}

.btn-primary:active {
  background: var(--primary-pressed);
  transform: translateY(0);
}

.btn-primary:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary__text {
  font-size: 16px;
}

.btn-primary__icon {
  font-size: 14px;
  transition: transform 0.2s ease;
}

.btn-primary:hover .btn-primary__icon {
  transform: translateX(4px);
}

.modern-login__decoration {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  overflow: hidden;
}

.decoration-circle {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light) 0%, rgba(227, 239, 255, 0.3) 100%);
  opacity: 0.6;
}

.decoration-circle--1 {
  width: 400px;
  height: 400px;
  top: -200px;
  right: -100px;
  animation: float 20s infinite ease-in-out;
}

.decoration-circle--2 {
  width: 300px;
  height: 300px;
  bottom: -150px;
  left: -100px;
  animation: float 15s infinite ease-in-out reverse;
}

.decoration-circle--3 {
  width: 200px;
  height: 200px;
  top: 50%;
  right: -80px;
  animation: float 18s infinite ease-in-out;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-30px) scale(1.05);
  }
}

@media (max-width: 640px) {
  .modern-login__card {
    padding: 32px 24px;
    border-radius: 20px;
  }

  .modern-login__title {
    font-size: 28px;
  }

  .modern-login__subtitle {
    font-size: 14px;
  }

  .modern-login__logo {
    height: 48px;
  }

  .form-field__input {
    height: 48px;
  }

  .btn-primary {
    height: 52px;
  }

  .decoration-circle--1 {
    width: 300px;
    height: 300px;
  }

  .decoration-circle--2 {
    width: 200px;
    height: 200px;
  }

  .decoration-circle--3 {
    display: none;
  }
}