/* =========================================================
   LOGIN - DISEÑO MODERNO, COMPACTO Y SIN DEGRADADOS
   ========================================================= */

html,
body {
  min-height: 100vh;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: #f1f5f9;
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  padding: 32px 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Animacion Shake al fallar */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.shake-card {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.login-brand {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo {
  display: block;
  max-width: 150px;
  width: auto;
  max-height: 72px;
  height: auto;
  object-fit: contain;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 12px;
}

.login-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.login-subtitle {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
}

.login-field {
  margin-bottom: 16px;
}

.login-field label {
  display: block;
  margin-bottom: 6px;
  color: #334155;
  font-size: 12.5px;
  font-weight: 700;
}

.login-input {
  position: relative;
}

.login-input > i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
  pointer-events: none;
  transition: color 0.15s ease;
}

.login-input input {
  width: 100%;
  height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 42px;
  color: #0f172a;
  font-size: 14px;
  outline: none;
  background-color: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-input input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.login-input input:focus + i,
.login-input input:focus ~ i {
  color: #2563eb;
}

.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}

.password-toggle:hover {
  color: #0f172a;
  background-color: #f1f5f9;
}

/* Aviso de Bloq Mayus */
.caps-warning {
  margin-top: 5px;
  padding: 3px 8px;
  background-color: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  display: flex;
  align-items: center;
}

.login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 18px;
  font-size: 12.5px;
}

.remember-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  margin-bottom: 0;
}

.remember-label input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #2563eb;
  cursor: pointer;
}

.forgot-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

.forgot-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.btn-login {
  width: 100%;
  height: 42px;
  border: 1px solid #2563eb;
  border-radius: 6px;
  background-color: #2563eb;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn-login:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
}

.btn-login:active {
  transform: scale(0.98);
}

.btn-login:disabled {
  cursor: wait;
  background-color: #60a5fa;
  border-color: #60a5fa;
  opacity: 0.85;
}

.login-error {
  display: none;
  margin-top: 14px;
  padding: 8px 12px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background-color: #fef2f2;
  color: #dc2626;
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
}

@media (max-width: 480px) {
  .login-page {
    padding: 14px;
  }

  .login-card {
    padding: 24px 18px;
  }

  .login-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
